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>
Subject: Re: [PATCH for-4.16 2/3] drivers: change struct device_driver::coredump() return type to void
Date: Sat, 24 Mar 2018 09:50:05 +0100	[thread overview]
Message-ID: <CAJ65rDy1UjJ7tEu4f3m8BwnA1qai1iRU3yWfU4qvEE9uLrr5pg@mail.gmail.com> (raw)
In-Reply-To: <20180323165543.GA21833@kroah.com>

On Fri, Mar 23, 2018 at 5:55 PM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Thu, Mar 15, 2018 at 10:55:24AM +0100, Arend van Spriel wrote:
>> Upon submitting a patch for mwifiex [1] it was discussed whether this
>> callback function could fail. To keep things simple there is no need
>> for the error code so the driver can do the task synchronous or not
>> without worries. Currently the device driver core already ignores the
>> return value so changing it to void.
>>
>> [1] https://patchwork.kernel.org/patch/10231933/
>>
>> Signed-off-by: Arend van Spriel <aspriel@gmail.com>
>> ---
>>  include/linux/device.h | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/linux/device.h b/include/linux/device.h
>> index b093405..f08c25b 100644
>> --- a/include/linux/device.h
>> +++ b/include/linux/device.h
>> @@ -256,6 +256,9 @@ enum probe_type {
>>   *           automatically.
>>   * @pm:              Power management operations of the device which matched
>>   *           this driver.
>> + * @coredump:        Called when sysfs entry is written to. The device driver
>> + *           is expected to call the dev_coredump API resulting in a
>> + *           uevent.
>>   * @p:               Driver core's private data, no one other than the driver
>>   *           core can touch this.
>>   *
>> @@ -287,7 +290,7 @@ struct device_driver {
>>       const struct attribute_group **groups;
>>
>>       const struct dev_pm_ops *pm;
>> -     int (*coredump) (struct device *dev);
>> +     void (*coredump) (struct device *dev);
>
> Isn't this going to cause build warnings now?  Are there no users of
> this callback function yet?

Hi Greg,

I submitted driver patches for the 4.17 kernel and from that
discussion we concluded it would be good to change to void return
type. So those driver patches were dropped. The caller of the callback
in drivers/base/dd.c does not use the return value so from that side
there is no issue. So my motivation for asking to consider this for
4.16 is so I can resubmit the driver patches for 4.17 if there is
still time before the merge window.

Regards,
Arend

  reply	other threads:[~2018-03-24  8:50 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 [this message]
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 ` [PATCH for-4.16 3/3] drivers: base: remove check for callback in coredump_store() Arend van Spriel
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=CAJ65rDy1UjJ7tEu4f3m8BwnA1qai1iRU3yWfU4qvEE9uLrr5pg@mail.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 2/3] drivers: change struct device_driver::coredump() return type to void' \
    /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).