Received: by 10.213.65.68 with SMTP id h4csp1240444imn; Sat, 24 Mar 2018 07:11:39 -0700 (PDT) X-Google-Smtp-Source: AG47ELuznYXSH4mdYrL9Pxymn4R5DIbXtX0hGrpcAZVhrPLEsBTomRyrccd9Det3IGOiPJ3rDNiG X-Received: by 10.99.180.77 with SMTP id n13mr23455894pgu.361.1521900699814; Sat, 24 Mar 2018 07:11:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521900699; cv=none; d=google.com; s=arc-20160816; b=FqBdFj5bCbfhVVfkRBn19YoXS/C2PYJHTYctnNRZUQ+APU+47ntAezatDVcfRIVtrV McERKPEPBNqUNssgu0RAuiGzmtE94TS9gHIbkMaAkU7Xe6cykUVxEtFPUPppc/GDke8j Fizml0unnxvR9meaE+jQ7SDPfbkve0GTjtW18fspioUJ8e0nPigRFHhNINnoMUO96y35 6ThJgl+0AZWb2N1aJLJ22ZL30McqHM3861wmMbNiluD2zRdQxOddxW8vDFzxxlOqb2wq sAdIIL7cBf6pT5WsAq00oPSX76k/O62/+QMe+tOrlEXvFJ5is6YhVNPHcLkHJCxyLOMv ez4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=++Y2sQv7j134Jc+4FIgWdcGgglFr1eNpOTpBoXM72RE=; b=nqBHyvp5qGWX969gfSaa+28hG8SQdoQJAjNgPzGXDdUHdDFoYh8XYYNCTyorctspT7 7RNLgE1DMdGodkA6vl5l/K4cB+NRgxKODjqIedbtrCz2YMECdNaLnpg3otwXxW1PM1c2 ow7A7mHfkk4/B26uViJATPN++vW0cvYmQ/Bc0vK0aI153VY3jb3uaVA3iE3fjoNenqnM pe2KMp/9txx5VzZeXq/W+VLCBsUzHFDUl4zyF+n3S2g2HUqxWzOdRPbetrS8MDksMUgX FVyzGQYOpbfVUZnpNvml/FuF1aAU27X3KnWdOfFf77R7I4rdzeU66efw7QgmAgXRifLC kuZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Aq+4ZGfr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v190si7601124pgb.67.2018.03.24.07.11.24; Sat, 24 Mar 2018 07:11:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Aq+4ZGfr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752105AbeCXOKe (ORCPT + 99 others); Sat, 24 Mar 2018 10:10:34 -0400 Received: from mail-vk0-f65.google.com ([209.85.213.65]:43245 "EHLO mail-vk0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751891AbeCXOKc (ORCPT ); Sat, 24 Mar 2018 10:10:32 -0400 Received: by mail-vk0-f65.google.com with SMTP id p189so8877443vkd.10 for ; Sat, 24 Mar 2018 07:10:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=++Y2sQv7j134Jc+4FIgWdcGgglFr1eNpOTpBoXM72RE=; b=Aq+4ZGfrwOkaPprQyQQreh0OZoeDI8ES1CozVEIRYymDk6mwQj9489nwHwE+91w9Ew Uvd18YlEOd/mrwNpHiZ8DBzIW3lvqQKMpRQCWpAO3oW4/yckSfsDPjJ4jrUv4x+FfTrR EXqxDPlO4I4dNa3tGLAX4c1RMN7R7DyoU0MijhSyduXgXd7XHHg5MYX1SAxIZ65w1pot wd2WEu4v/FvdaRRKEXq1fs3zNXbG8Hiizp2wAsZ7brsERekkOEmwn+1WxRGckzcITMfP vnKB/L5Ku5x+7kgSW2KISkjxhsyx/2cX5T4hQ0dxgaZgj+CBFFlGWeDz8H0+oEDB8jLu BQ+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=++Y2sQv7j134Jc+4FIgWdcGgglFr1eNpOTpBoXM72RE=; b=AvClllnU78Gqtdu/syNH3LelxgaHgGoITcKBGyEdrZrTJ6TNnIiI6wAH064Uq+udjC 14mdu59wXiFsQByGlJMwnBDhVG3pytm1WCbcqnPOc8+xHeo0NNWaZsv7SvQTH0wXxHHb zkTRf/OHwZAN7uBz6Ky2dXxM+s3yGqii4BI7hDMRy/NvRFE1c2HbsogPMfXcL0Pjo7d9 ccYkcNUxU3ZpfHMyQvv3Ej/VffV2ezakht0+F5Rh7bvEv1n8VyhVKJfbX8+lXfkvh5Mt hmEQh9DlQeFyhl3Cqyu4ndw4GOnjSEZBAGzw0XVOjTh8gH9lR24ZuyAJ4TdM7rfte65d o6pw== X-Gm-Message-State: AElRT7EuzL2L787ZYledB9vx/C16bcMMtEDFQkfVsABuSGEfA57Gamu+ LF11HWBHMY4nIZuBQCKzy0LAq0ciaiRum/LJo0g= X-Received: by 10.31.219.2 with SMTP id s2mr20612276vkg.87.1521900631396; Sat, 24 Mar 2018 07:10:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.210.133 with HTTP; Sat, 24 Mar 2018 07:10:30 -0700 (PDT) In-Reply-To: <20180324090446.GA863@kroah.com> References: <1521107725-25027-1-git-send-email-aspriel@gmail.com> <1521107725-25027-3-git-send-email-aspriel@gmail.com> <20180323165543.GA21833@kroah.com> <20180324090446.GA863@kroah.com> From: Arend van Spriel Date: Sat, 24 Mar 2018 15:10:30 +0100 Message-ID: Subject: Re: [PATCH for-4.16 2/3] drivers: change struct device_driver::coredump() return type to void To: Greg Kroah-Hartman Cc: LKML , Brian Norris , Marcel Holtmann Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org + Marcel On Sat, Mar 24, 2018 at 10:04 AM, Greg Kroah-Hartman wrote: > On Sat, Mar 24, 2018 at 09:50:05AM +0100, Arend van Spriel wrote: >> On Fri, Mar 23, 2018 at 5:55 PM, Greg Kroah-Hartman >> 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 >> >> --- >> >> 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. > > It's too late for 4.16 for this, and I would queue it up in my tree now > but I don't want to cause any build warnings in linux-next from it. So > how about I submit something like this right after 4.17-rc1 is out, > where the function signature is changed _and_ all definitions of that > function are changed at the same time to keep everything sane at once? > > Can you send me such a patch right before -rc1 is out base on Linus's > tree? That should give everyone enough time to get the things merged, > right? > > Or is there no in-flight patches to use this yet, and I can queue it up > now for -rc1 as no build warnings will happen? I had patches for wireless and bluetooth. The latter was already applied by Marcel, but I asked to revert that. However, I just checked bt-next to be sure and it is still there. @Marcel: Can you revert commit 118c193d9699 ("btmrvl: support sysfs initiated firmware coredump") [1] With that out of the way there are no in-flight patches yet. Regards, Arend [1] https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/?id=118c193d