Received: by 10.213.65.68 with SMTP id h4csp1049124imn; Sat, 24 Mar 2018 01:53:43 -0700 (PDT) X-Google-Smtp-Source: AG47ELup/IRMlsdZ0Msw4JzefhwJTDe4sNijgYriHDOmshOFHmUgQ+MT3rdWSkfkd+wrz3t84LWA X-Received: by 2002:a17:902:aa91:: with SMTP id d17-v6mr33042621plr.145.1521881623864; Sat, 24 Mar 2018 01:53:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521881623; cv=none; d=google.com; s=arc-20160816; b=tcHZBfGWDlhPbWOoB7cjFo1seB7BZHbNk53XQZuWBNnQP5WuXkpc3jn5UmKRCMbXp2 oYgB3kw4/eZculA82LZ0dmM/hmuC6Y1SeudIA3helQ5skFZTdIlRnkpRckVZ4OFuoNXX 3uptEXStyjY3zKRmeo5o8qSBRH2lfuBSIcjEAHqDuvm8eIyNjZn2MG5Eo5ivOyFvaJ8x IvuaSNmVokcbYgOplvlPLqnZ17QtDj+lhqH0y/AgcPutgHgCyhQ2iXwolJ/QBz+feGTm 6x9M2YefApKnrf+099HjV0UOACWJeLxXym47jevbRObolE9LGgY5sRMYHs9bOUgxW0pG QDaQ== 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=IMuD6tdFlcSnLuy78Kjsw4gKPT5y2VQ49oR6fXdBN+A=; b=XTaiyfgd42J9xkZC/9ekvXPbeOJq9sgkFLV5Fth9tzahUROm5aJQf/VtILAHob0pm1 oi+/S+EQFQW/LY4Tm0gzrTjC+EJ45V7YbMhKeyg0Bb5YZYYxF4hHtoQD6BkPyXXOWe86 VUCZc3ViE39HBRsctriFFZrLZwMEHyP3+eJWAaUeinaJIwFHWRZFkI+ojC2WuXgecyaJ A5yuV9v0pknS721pG9gM+aKkhq7HK2XbRQGM3NP1V0jXivWU9eWroRtvgfec7feYLhtL dGEOGHM4OdiSDTWIbWuqVX/TgNIiIfTfqV6ha6KGR9yX9de21Mz5+UqGHKckmkFPemJi t19Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pdgsUZLW; 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 y11si7223173pgv.74.2018.03.24.01.52.50; Sat, 24 Mar 2018 01:53:43 -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=pdgsUZLW; 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 S1751832AbeCXIuJ (ORCPT + 99 others); Sat, 24 Mar 2018 04:50:09 -0400 Received: from mail-ua0-f195.google.com ([209.85.217.195]:40841 "EHLO mail-ua0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751699AbeCXIuH (ORCPT ); Sat, 24 Mar 2018 04:50:07 -0400 Received: by mail-ua0-f195.google.com with SMTP id n20so483000ual.7 for ; Sat, 24 Mar 2018 01:50:06 -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=IMuD6tdFlcSnLuy78Kjsw4gKPT5y2VQ49oR6fXdBN+A=; b=pdgsUZLWNkNThYoU91yAesl8GFdn/aytnnh/wYTatHUKANM1vz7tydG48m3Anbq7w7 sNs6JLMBzece3Y5YTy2DOiviEFkjnxpmJRrN0+XWl57spKndUZQUyrob8gRu0ArIJKYo lH28EPBXdy+vpMdJ7NJ3C5kcI118lxI5OeEMJWQqZJqfQe8zbWYqot13ZAy051/Z4T+6 teUc1UEAVBvoWjJGzzK32/v6ymL4xkLx2IM6Yp7hnzmeYG4RyqRHJAcZ4knHnP6mUb2T nbZ+hVXbywixE0LimW7671kaMLUgDq9Bhr/1WyDTuy1f1gJldW0txPI57Wf1G2qBL442 sfog== 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=IMuD6tdFlcSnLuy78Kjsw4gKPT5y2VQ49oR6fXdBN+A=; b=caPgfBYcV/AZmo014M9l2L6qbaoWIL/fHsUTENUqAj20VeoSO0IedavtsDtgKAtfa0 OFoCwVuBKeqlC4zejlzyzL/8Idhc130Dlc/IjKJY7GEKK/8lWwNwpOXjCJsfFew9SCV9 t3EWJdivOf4AME1NEQrifQrcefu/uz1bSs7RxecnmXWh7dg/Bv5TlJgkFFuE4iagbcKH Hn6Bu35zFzY20bkT3qwy5hZm+d/3SA5VyFxvZTO0FMJ7iO7vuqvzclB07dHbPJ9Vmhcj 2STZzU00BAlDij/zWxlucPTLVAsDK7oYSovkAZyVwQMRmUvE9d4S/4OI1UBhHbgC6VQ5 1m8Q== X-Gm-Message-State: AElRT7GTrfzSJvtATNF6XUY0ce1YFHnqUPqrdURGCwQiXIBh9Hi/bTMZ 6EMcoAn083SlfrQiIV4u8sAy/XdiIcoY0KXllKM= X-Received: by 10.176.66.230 with SMTP id j93mr21056611uaj.64.1521881406300; Sat, 24 Mar 2018 01:50:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.210.133 with HTTP; Sat, 24 Mar 2018 01:50:05 -0700 (PDT) In-Reply-To: <20180323165543.GA21833@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> From: Arend van Spriel Date: Sat, 24 Mar 2018 09:50:05 +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 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 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. Regards, Arend