LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Arend van Spriel <aspriel@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Brian Norris <briannorris@chromium.org>,
Arend van Spriel <aspriel@gmail.com>
Subject: [PATCH for-4.16 3/3] drivers: base: remove check for callback in coredump_store()
Date: Thu, 15 Mar 2018 10:55:25 +0100 [thread overview]
Message-ID: <1521107725-25027-4-git-send-email-aspriel@gmail.com> (raw)
In-Reply-To: <1521107725-25027-1-git-send-email-aspriel@gmail.com>
The check for the .coredump() callback in coredump_store() is
redundant. It is already assured the device driver implements
the callback upon creating the coredump sysfs entry.
Signed-off-by: Arend van Spriel <aspriel@gmail.com>
---
drivers/base/dd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index de6fd09..c9f5408 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -292,8 +292,7 @@ static ssize_t coredump_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
device_lock(dev);
- if (dev->driver->coredump)
- dev->driver->coredump(dev);
+ dev->driver->coredump(dev);
device_unlock(dev);
return count;
--
1.9.1
next prev parent reply other threads:[~2018-03-15 9:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-15 9:55 [PATCH for-4.16 0/3] drivers: base: revise coredump ABI Arend van Spriel
2018-03-15 9:55 ` [PATCH for-4.16 1/3] sysfs: improve devices-coredump description with user-space perspective Arend van Spriel
2018-03-15 17:05 ` Brian Norris
2018-03-15 20:20 ` Arend van Spriel
2018-03-15 9:55 ` [PATCH for-4.16 2/3] drivers: change struct device_driver::coredump() return type to void Arend van Spriel
2018-03-23 16:55 ` Greg Kroah-Hartman
2018-03-24 8:50 ` Arend van Spriel
2018-03-24 9:04 ` Greg Kroah-Hartman
2018-03-24 14:10 ` Arend van Spriel
2018-04-06 10:13 ` Arend van Spriel
2018-04-06 14:46 ` Greg Kroah-Hartman
2018-04-06 19:35 ` Arend van Spriel
2018-04-07 7:49 ` Greg Kroah-Hartman
2018-03-15 9:55 ` Arend van Spriel [this message]
2018-03-23 16:56 ` [PATCH for-4.16 0/3] drivers: base: revise coredump ABI Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1521107725-25027-4-git-send-email-aspriel@gmail.com \
--to=aspriel@gmail.com \
--cc=briannorris@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: [PATCH for-4.16 3/3] drivers: base: remove check for callback in coredump_store()' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).