Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1474924ybm; Thu, 23 May 2019 01:28:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqwr0RRn3qv+Mu544oWlOhQRwrliyRmoZjMTq5JMRkVC5NNW78/jzxAnoNKCqBZYj+7Eis8y X-Received: by 2002:a17:902:12f:: with SMTP id 44mr49959518plb.137.1558600133768; Thu, 23 May 2019 01:28:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558600133; cv=none; d=google.com; s=arc-20160816; b=ezXRj7z/ouXGUWRv6LajZPN2RvL3H8VRENuJkdKv0FUjLFWRrqdmAS8QJzbB9Ae/4g K3d5+mLKCJ3j3g2ZJHMIg92adrXIN3sLTb/xwhDmTiqdj/NIQ4Tlo0lmW7GCW3gqfQv0 GdLSwF7unFhd6Bh2ZRe7iqy/Vafv7sFH3zKOVLAmIFY/f7PNe6cDShp+3RNzG8OvhDb+ KWDA0kguZV4u8f8Sxk1Tn3Qw6bnFyxlVWnhgGwx4QegdeakOrBmGH5TR3T8abAyqKXt6 EK46JUKKASeu+tHek5h77/OqMCvffnejNqzXMACGWf3XD84N48StqHJNOFNhwjvgya2i PJbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=laWNxyj4QxC3MlDfbc/zEczN2hqihpcdSWmuVHZuqco=; b=pLYd7cURjo3Xfzn4e7D6mmJadztAEQeaeSI7ymhYMnpjAnC05vMGKjs3S8LmW/242d LPZF0p3jzUHY2MHlUCXEDN7Up4E3Gb8ezBcwCjM+0V9/9nu7RurUv8Coi+yjmgQGTwLs YFpd6hVUQvPMrvxxgzT0rW7iAjbVCf5Cv31r3uJ3RhaR6At31wawgkndnRmt/vOnt1LZ ZSfhL0hAQKQSqKGmZ+TY3i6B2tXmbQ8rdqJNT2OaVMrn28n1E9Pa41uMlrsY9vIGhXCh 2ocABfQM+RCLAfWe16CvR7Odkrkx2SqgQ6C6z94CTMwpqEzq17pU4DK4jls2of/LIJdJ 9Zww== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@azazel.net header.s=20190108 header.b=fajj1X75; 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=fail (p=NONE sp=REJECT dis=NONE) header.from=azazel.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f71si27130400pgc.150.2019.05.23.01.28.38; Thu, 23 May 2019 01:28:53 -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=fail header.i=@azazel.net header.s=20190108 header.b=fajj1X75; 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=fail (p=NONE sp=REJECT dis=NONE) header.from=azazel.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729361AbfEWI1P (ORCPT + 99 others); Thu, 23 May 2019 04:27:15 -0400 Received: from kadath.azazel.net ([81.187.231.250]:60530 "EHLO kadath.azazel.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726237AbfEWI1P (ORCPT ); Thu, 23 May 2019 04:27:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=azazel.net; s=20190108; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=laWNxyj4QxC3MlDfbc/zEczN2hqihpcdSWmuVHZuqco=; b=fajj1X75+kvgbtjDHr6oPFkEj/ MiNNaCTInJAOAbPSBJFJazJf3UWePctpC9O2VYE56tXqexuY7RNMBHpu1g3iQhE8+ruQpfM5mm/st 4PMs3lJ1OpLrijksb19mSp5eE0BZAK7B70NEUnZxRoP7hNXlKt6VcVfeXrwph+qCoXaBtR5+++8o5 o8c6aLJvwIy4XWpelzJbECR4b2wTZEpdAa2UieNKV/tQqqJGCXeXfvrI9G0sIIBJSHPXpvjuJKME9 s1wqTgPr0NiYYNxxPxwNhuL7zMEfnilScXqoedZRph5mPROiMfaagi1JR5JFNFiIMi21bqn3h6s+7 kYC/3/Wg==; Received: from celephais.dreamlands ([192.168.96.3] helo=azazel.net) by kadath.azazel.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hTj44-0000Ui-9t; Thu, 23 May 2019 09:27:04 +0100 Date: Thu, 23 May 2019 09:27:02 +0100 From: Jeremy Sowden To: Nishka Dasgupta Cc: Greg KH , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: fieldbus: anybuss: Remove unnecessary variables Message-ID: <20190523082702.GB28231@azazel.net> References: <20190523063504.10530-1-nishka.dasgupta@yahoo.com> <20190523072220.GC24998@kroah.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="kORqDWCi7qDJ0mEj" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 192.168.96.3 X-SA-Exim-Mail-From: jeremy@azazel.net X-SA-Exim-Scanned: No (on kadath.azazel.net); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --kORqDWCi7qDJ0mEj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 2019-05-23, at 13:51:18 +0530, Nishka Dasgupta wrote: > On 23/05/19 12:52 PM, Greg KH wrote: > > On Thu, May 23, 2019 at 12:05:01PM +0530, Nishka Dasgupta wrote: > > > In the functions export_reset_0 and export_reset_1 in > > > arcx-anybus.c, the only operation performed before return is > > > passing the variable cd (which takes the value of a function call > > > on one of the parameters) as argument to another function. Hence > > > the variable cd can be removed. Issue found using Coccinelle. > > > > > > Signed-off-by: Nishka Dasgupta > > > --- > > > drivers/staging/fieldbus/anybuss/arcx-anybus.c | 8 ++------ > > > 1 file changed, 2 insertions(+), 6 deletions(-) > > > > > > diff --git a/drivers/staging/fieldbus/anybuss/arcx-anybus.c b/drivers/staging/fieldbus/anybuss/arcx-anybus.c > > > index 2ecffa42e561..e245f940a5c4 100644 > > > --- a/drivers/staging/fieldbus/anybuss/arcx-anybus.c > > > +++ b/drivers/staging/fieldbus/anybuss/arcx-anybus.c > > > @@ -87,16 +87,12 @@ static int anybuss_reset(struct controller_priv *cd, > > > static void export_reset_0(struct device *dev, bool assert) > > > { > > > - struct controller_priv *cd = dev_get_drvdata(dev); > > > - > > > - anybuss_reset(cd, 0, assert); > > > + anybuss_reset(dev_get_drvdata(dev), 0, assert); > > > } > > > > While your patch is "correct", it's not the nicest thing. The way the > > code looks today is to make it obvious we are passing a pointer to a > > struct controller_priv() into anybuss_reset(). But with your change, it > > looks like we are passing any random void pointer to it. > > > > So I'd prefer the original code please. > > Thank you, I'll drop this patch then. > > > Also, you forgot to cc: Sven on this patch, please always use the output > > of scripts/get_maintainer.pl. > > Which arguments should I use? If I use --nokeywords, --nogit, > --nogit-fallback and --norolestats then only your name and the two > mailing lists show up. (Also, regarding the mailing lists: every mail > sent to linux-kernel@vger.kernel.org is bouncing; should I not send to > that list anymore?) He is listed in the TODO: $ cat drivers/staging/fieldbus/TODO TODO: -Get more people/drivers to use the Fieldbus userspace ABI. It requires verification/sign-off by multiple users. Contact: Sven Van Asbroeck J. --kORqDWCi7qDJ0mEj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEZ8d+2N/NBLDbUxIF0Z7UzfnX9sMFAlzmWU4ACgkQ0Z7UzfnX 9sPxGxAAiDRI2wAkIGuK975XrPrMZwvvlMOXh5wuhf8FoE9y5nOnUchJ+ly61zS/ 21kZkjqEj8xySaijYwVSLVVfbB0rbM05b6dhHrscJ4GejDYeHSHvCNDY4j4uJqRW SpuC5rRq7L4Z7v7AoJMgL8K3WXYdqEcydU3+kx6JodMc6aJfWWzjfLaKF2oQWITH TsLk9MECPe143qLZe4Y/isjcvd5ixipcCy1wNv7VyXHf6ANWVf5R9LfOCgooe4uG A4Gu8g9BguUQHJyQR4J3oZjTxUzf/jyrISHBMGSm60miDC0PLUyejHOmV5E+BZ/U rVU9pZsEux/wfZR4AZkJ5TMF7Yn2bEKEJ4zhXoOHxZPYJi5guxwOe8exy4aBL+o+ OoaU8w2u5GUKkZXk1UT+DtKCuJfk3CKvKNbvrYzbq6jHJTV0y8MZwomGPvPV0PG7 ANBv2PXA0JuazFNzXcmgrBx42+3uaUlqtQrI6rsN1HDVuH8bo2Sbe/L3+eitqTvh O8hFrQZRpouX9aux0KtMvfvWg+Qg9OXnRBVT15KxCfUvCvG4XWYjfvIjVdWdc392 X2To23kn1GqQ+R4FdVM1PTRQDpNTU0wH3q2WHjN9WWrcbZFFh8Tj2NeQmkAxVIod wj+2bYR6LLl3/l02zjGAnvYM+g4a3u0iXiokdZxmFpPx772iimE= =a6AF -----END PGP SIGNATURE----- --kORqDWCi7qDJ0mEj--