Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp5465581pxv; Wed, 7 Jul 2021 04:33:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8uk4EqHwsvRpyBxFIuA7fRf+K17XieA3j8F89puQ2xCfw/K28OfjUT+fppyA/1T6WRNVG X-Received: by 2002:a05:6638:63c:: with SMTP id h28mr8153011jar.80.1625657581574; Wed, 07 Jul 2021 04:33:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625657581; cv=none; d=google.com; s=arc-20160816; b=aD7JD04ZQNmla3zjI8GRPumAito/BpIWtWS62u8r0kKky+4pf9g8onIFJw0tUWLZaT pct/YZewM+gssxlvr94IJLbulgizhnZR31S++DudGiqOCSTB9jAqzuf3j3S1f/AWQMOT BNVXQdtmj0GSrV2Ack+TTusxU1MHsdYLCXaaaDmngy1mNxw4KvNZEnGDHOHEQXySzUWg jBOKuZ457e9uGrcv96fqck+9S0z0SV6UbbdT85MHgHrFUcuCCKElqmIg4hgcPgKFyg9j RYIxxHUxR4I/G2tGmNOGHgRGJ4FSNj9jUwZh4Hiy7bWkUkxC+9q3gQYT7frgHczo7d4n rUvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=NJ8tcuv5l8JY0wkLfzi5PvGflZ2VNsIY+jVzHpsSsuk=; b=V7pyKVcuxaxHo9TjioREfgUoxPLJOgG0eXp8IQUsC0FW0rWOtC0D75JcKYGUNdqj3v eCxWmAdYpZAuRrcX4I7qWzJb1nSCRiLAOXW+aCAeJFiUCUmR0I0pXZPrNM+RN+9pDUIR T6DzFYpuIIV9OmNKolqRC5K5k7Vdg0aW3f0gjq23WFTmzL+vK7QE8d7Lu0GeAQODV9hj 0ErfgNRoL/Fy2R3cCQ7BECSk3Aq4kgq18lTp6jCsoOH7qFAi64FWwhzkOOMNtWNe94gj DwMWCaUOii2u1HL7fR3NNvFh48hBKy4YgVadBtNzeZYtd0XQsbBHDk9QXMnB1Cl8/5rN qlSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=H8Hg+y54; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n2si2852555jaj.36.2021.07.07.04.32.49; Wed, 07 Jul 2021 04:33:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=H8Hg+y54; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231397AbhGGLfC (ORCPT + 99 others); Wed, 7 Jul 2021 07:35:02 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:7112 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230354AbhGGLfB (ORCPT ); Wed, 7 Jul 2021 07:35:01 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 167B5aLW186267; Wed, 7 Jul 2021 07:32:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=NJ8tcuv5l8JY0wkLfzi5PvGflZ2VNsIY+jVzHpsSsuk=; b=H8Hg+y54g6DMoU61Cz9nORnHlhOAxK1ar+1eV93VDfErRDytq73mcYalfnPGP2+l7S3/ mmYlRN18tlm+s5j/Z/hAgatN9ovrv9QFzbXGEZ5206cn7R37UZ6wJo6NiGTQvk5KLk0P Nnm/zz0ziAuRHHYdJrWzuAJIuZ9Jv4CeZ8qzVoneksWavdQVD6TTVvHc5hisJdiVwrrS VB5Ed/Q8WeiF9gZROgwOivaGTl0+bBNhqi3z0asoLEjJy8ysaTXYop8OgLu9wgijg+1C VhCjOVZer1+Xf+/WxL6lOIxes9Wu0kjwYL0OlbWPlGYUmHDWRCtQhn65E2s2v/7YIOyb tQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 39naym8ur1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Jul 2021 07:32:17 -0400 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 167B5acp186285; Wed, 7 Jul 2021 07:32:17 -0400 Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 39naym8uq3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Jul 2021 07:32:16 -0400 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 167BPHe6012699; Wed, 7 Jul 2021 11:32:14 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma06ams.nl.ibm.com with ESMTP id 39jf5h9qau-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Jul 2021 11:32:14 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 167BUHKl31326678 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 7 Jul 2021 11:30:17 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AE2644C046; Wed, 7 Jul 2021 11:32:11 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 55D794C052; Wed, 7 Jul 2021 11:32:11 +0000 (GMT) Received: from oc6887364776.ibm.com (unknown [9.152.212.90]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 7 Jul 2021 11:32:11 +0000 (GMT) Subject: Re: [PATCH v2 3/4] s390/scm: Make struct scm_driver::remove return void To: =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= , Greg Kroah-Hartman Cc: kernel@pengutronix.de, Cornelia Huck , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Peter Oberparleiter , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210706154803.1631813-1-u.kleine-koenig@pengutronix.de> <20210706154803.1631813-4-u.kleine-koenig@pengutronix.de> From: Vineeth Vijayan Message-ID: Date: Wed, 7 Jul 2021 13:32:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210706154803.1631813-4-u.kleine-koenig@pengutronix.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: VaGoYi_8ePeZi5eS8Nw4ewNQgdDDAWEs X-Proofpoint-GUID: ZoIRRP4qg58y_lpe_ZsHi6cqeKEMJHlo X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-07-07_06:2021-07-06,2021-07-07 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 phishscore=0 spamscore=0 mlxlogscore=999 impostorscore=0 mlxscore=0 clxscore=1015 adultscore=0 priorityscore=1501 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107070067 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Looks sane to me. Acked-by: Vineeth Vijayan Vasily/Heiko will pick this up for the next-s390-tree. On 7/6/21 5:48 PM, Uwe Kleine-König wrote: > The driver core ignores the return value of scmdev_remove() > (because there is only little it can do when a device disappears). > > So make it impossible for future drivers to return an unused error code > by changing the remove prototype to return void. > > The real motivation for this change is the quest to make struct > bus_type::remove return void, too. > > Signed-off-by: Uwe Kleine-König > --- > arch/s390/include/asm/eadm.h | 2 +- > drivers/s390/block/scm_drv.c | 4 +--- > drivers/s390/cio/scm.c | 5 ++++- > 3 files changed, 6 insertions(+), 5 deletions(-) > > diff --git a/arch/s390/include/asm/eadm.h b/arch/s390/include/asm/eadm.h > index bb63b2afdf6f..445fe4c8184a 100644 > --- a/arch/s390/include/asm/eadm.h > +++ b/arch/s390/include/asm/eadm.h > @@ -105,7 +105,7 @@ enum scm_event {SCM_CHANGE, SCM_AVAIL}; > struct scm_driver { > struct device_driver drv; > int (*probe) (struct scm_device *scmdev); > - int (*remove) (struct scm_device *scmdev); > + void (*remove) (struct scm_device *scmdev); > void (*notify) (struct scm_device *scmdev, enum scm_event event); > void (*handler) (struct scm_device *scmdev, void *data, > blk_status_t error); > diff --git a/drivers/s390/block/scm_drv.c b/drivers/s390/block/scm_drv.c > index 3134fd6e058e..69a845eb8b1f 100644 > --- a/drivers/s390/block/scm_drv.c > +++ b/drivers/s390/block/scm_drv.c > @@ -60,15 +60,13 @@ static int scm_probe(struct scm_device *scmdev) > return ret; > } > > -static int scm_remove(struct scm_device *scmdev) > +static void scm_remove(struct scm_device *scmdev) > { > struct scm_blk_dev *bdev = dev_get_drvdata(&scmdev->dev); > > scm_blk_dev_cleanup(bdev); > dev_set_drvdata(&scmdev->dev, NULL); > kfree(bdev); > - > - return 0; > } > > static struct scm_driver scm_drv = { > diff --git a/drivers/s390/cio/scm.c b/drivers/s390/cio/scm.c > index 9f26d4310bb3..b31711307e5a 100644 > --- a/drivers/s390/cio/scm.c > +++ b/drivers/s390/cio/scm.c > @@ -33,7 +33,10 @@ static int scmdev_remove(struct device *dev) > struct scm_device *scmdev = to_scm_dev(dev); > struct scm_driver *scmdrv = to_scm_drv(dev->driver); > > - return scmdrv->remove ? scmdrv->remove(scmdev) : -ENODEV; > + if (scmdrv->remove) > + scmdrv->remove(scmdev); > + > + return 0; > } > > static int scmdev_uevent(struct device *dev, struct kobj_uevent_env *env)