Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4707258yba; Wed, 17 Apr 2019 17:58:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjGIljIS7CT6a2wkN9Pq//DQZ4Q8j8kqIZo6ct9rnkPC1Rk3VDZFd/Cn7BJjrwxvlDFhCi X-Received: by 2002:a62:5707:: with SMTP id l7mr64626829pfb.205.1555549089147; Wed, 17 Apr 2019 17:58:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555549089; cv=none; d=google.com; s=arc-20160816; b=AecOVzV+McKroGq5O+ZagzzatbmGyp5u1wnaVxfs0Ny2d2km2tPcS+2/scPsvh2/Co goeteDz9TK0RMl/ZQERZFgcHDFqSd80SbQ0yvzkmRa8ZIuLDNJvEmqJ7QzsxNmDwuc4B fK00hD7s/V21GjUodVmd0gO4cWDx6Yh400KaHuyxaLXTSVn0ZKs7a0ZCyqcsrUxrRyUH CF15O2MXVAvLdGfZL1L833QjX3Yv13HeQO3PNQ7UNFBBHmR6sA4dGmu5ovdERSWhnaCR MypucxWW+jJAqiXo021NKzyPAKYbzl90wHTHFWg69UoPgvKrKDac9XgnpnKZ/FNUjDzh R+EA== 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=AV64GvdS0YzPBsOlzyDEAVi9ue4MjVTIDqGNkDwC9Io=; b=UaZ+dGw68aI9XUjHeXCjoQ4xP0xUYOuaXTdn4QXP6935M8LboTfDdoGZdbNxHJo6bo 5KhhEWNansmJZWemqz75Dq3ubwj01sHCjgZ2vIuSyr7EQmKTnHuC9XFk+BPILOFLx/qK wGBboxsOQzaF4/GfDLrH9P6nkmhQoyqlhUBf2r9/y7wR3qJF/MOeMn3SO/yNuICR7FV1 RMOQnlCwHew4Y//eweqXdpdA/7qyNs5Hn5n07gcPsaCXoafnTaIjD4kDsoEmI6qgGNWo XysmsJC+5LnciD+GviIARbefLbbxMxUBD27N8ueS7J/NSJ2wriHPJ1IrR8wghxS2amQz ooOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FG3VtRXX; 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 c11si410042pga.462.2019.04.17.17.57.53; Wed, 17 Apr 2019 17:58:09 -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=FG3VtRXX; 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 S2387581AbfDRAzi (ORCPT + 99 others); Wed, 17 Apr 2019 20:55:38 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:46099 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729446AbfDRAzi (ORCPT ); Wed, 17 Apr 2019 20:55:38 -0400 Received: by mail-oi1-f195.google.com with SMTP id x188so263811oia.13 for ; Wed, 17 Apr 2019 17:55:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=AV64GvdS0YzPBsOlzyDEAVi9ue4MjVTIDqGNkDwC9Io=; b=FG3VtRXXvVmeoCr8SriXFcdTfidzpRciVS+Fgb2ZffXESpMWl65i57FK1Ua7x9JhGv wI9DO85Haax7WSJUAPP6uI/ZhMZhr3iZm4eyu7MTpged/PuPGgDHebfhCdZOX9b91kB3 rvKLQSN944b5eJyHyIUfj+HqVwZ4ojl9yNxxzqElSUYtdv+ZxYIyCdB1vxmR2wpzxGAJ 4S31IunJogi+1Jt7DvDpRypEek2awsnRHsEfi9HYjp2aCSAOkZwsT6t4EPcXsgmjXYwX qMUeC9bT7sApRnEuEMeS0GCoQ6vkVH7sKkhjCorpDn6wZDGFtR3728+mMQudRg2KyvAr Q+IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=AV64GvdS0YzPBsOlzyDEAVi9ue4MjVTIDqGNkDwC9Io=; b=iTUHmyWFW/4k5vZoK+rwIQXRDLbQNvUyFACJpkKlvUwFIqh7HV7AEeBk2P69FBQW0A pbSEk7zCh4zGuul33DvCUEcC/eb4kv3QBDYhkRPGcQ8R07aNn3hIn7Bn0iE3/ouSPyvq LmWk0+fTNggEXkMgYaI3wtuRMbe4/jf9+bwLgZw3TM58PjZjzoEfeNdYm8USE4gK8eSk Rl4KovBXSazvmxhvX1RtEX9KSezCBnOVh3A8RpAaCqlHM+On+Ez8f7fGznz8FtxYjc09 agPGyE2vWk6ZBJBcMbsNsiJ6wvDId1Oi1L5J6XNykSM4QjV94HpvkCwRourV8KE+csW8 9+gw== X-Gm-Message-State: APjAAAV8gQt/BdH2eEHce1eD/Qo7K2oTPS/Ah0m55Ku2yNd2ih5C/XH5 l97ha4wb3TSaRsbwWQlwiI73uDpju9ZAFg== X-Received: by 2002:aca:3b43:: with SMTP id i64mr249945oia.121.1555548937062; Wed, 17 Apr 2019 17:55:37 -0700 (PDT) Received: from madhuleo ([2605:6000:1023:606d:9d55:3ae5:fad7:6d16]) by smtp.gmail.com with ESMTPSA id h8sm201864oti.64.2019.04.17.17.55.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Apr 2019 17:55:36 -0700 (PDT) Date: Wed, 17 Apr 2019 19:55:33 -0500 From: Madhumitha Prabakaran To: Greg KH Cc: johan@kernel.org, elder@kernel.org, greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] Staging: greybus: Cleanup in greybus driver Message-ID: <20190418005532.GA3421@madhuleo> References: <20190416221318.21161-1-madhumithabiw@gmail.com> <20190417062518.GA23076@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190417062518.GA23076@kroah.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/17 :25, Greg KH wrote: > On Tue, Apr 16, 2019 at 05:13:18PM -0500, Madhumitha Prabakaran wrote: > > Fix a blank line after structure declarations. Also, convert > > macros into inline functions in order to maintain Linux kernel > > coding style based on which the inline function is > > preferable over the macro. > > > > Blank line fixes are suggested by checkpatch.pl > > > > Signed-off-by: Madhumitha Prabakaran > > > > Changes in v2: > > - To maintain consistency in driver greybus, all the instances of macro > > with container_of are fixed in a single patch. > > --- > > drivers/staging/greybus/bundle.h | 6 +++++- > > drivers/staging/greybus/control.h | 6 +++++- > > drivers/staging/greybus/gbphy.h | 12 ++++++++++-- > > drivers/staging/greybus/greybus.h | 6 +++++- > > drivers/staging/greybus/hd.h | 6 +++++- > > drivers/staging/greybus/interface.h | 6 +++++- > > drivers/staging/greybus/module.h | 6 +++++- > > drivers/staging/greybus/svc.h | 6 +++++- > > 8 files changed, 45 insertions(+), 9 deletions(-) > > > > diff --git a/drivers/staging/greybus/bundle.h b/drivers/staging/greybus/bundle.h > > index 8734d2055657..84956eedb1c4 100644 > > --- a/drivers/staging/greybus/bundle.h > > +++ b/drivers/staging/greybus/bundle.h > > @@ -31,7 +31,11 @@ struct gb_bundle { > > > > struct list_head links; /* interface->bundles */ > > }; > > -#define to_gb_bundle(d) container_of(d, struct gb_bundle, dev) > > + > > +static inline struct gb_bundle *to_gb_bundle(struct device *d) > > +{ > > + return container_of(d, struct gb_bundle, dev); > > +} > > Why are we changing this to an inline function? The #define is fine, > and how we "normally" do this type of container_of conversion. > > I understand the objection of the "no blank line", but this was the > "original" style that we used to create these #defines from the very > beginning of the driver model work a decade ago. Changing that > muscle-memory is going to be hard for some of us. Look at > drivers/base/base.h for other examples of this. Thanks for explaining it. > > thanks, > > greg k-h