mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Bhumika Goyal <bhumirks@gmail.com>
Cc: julia.lawall@lip6.fr, a.zummo@towertech.it,
	rtc-linux@googlegroups.com,
	adi-buildroot-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rtc: add const to rtc_class_ops structures
Date: Wed, 11 Jan 2017 01:14:50 +0100	[thread overview]
Message-ID: <20170111001450.6kmxtinx2n2iyh5o@piout.net> (raw)
In-Reply-To: <1483636717-30429-1-git-send-email-bhumirks@gmail.com>

On 05/01/2017 at 22:48:37 +0530, Bhumika Goyal wrote :
> Declare rtc_class_ops structures as const as they are only passed
> as an argument to the function devm_rtc_device_register. This argument
> is of type const struct rtc_class_ops *, so rtc_class_ops structures
> having this property can be declared const.
> Done using Coccinelle:
> 
> @r1 disable optional_qualifier @
> identifier i;
> position p;
> @@
> static struct rtc_class_ops i@p = {...};
> 
> @ok1@
> identifier r1.i;
> position p;
> @@
> devm_rtc_device_register(...,&i@p,...)
> 
> @bad@
> position p!={r1.p,ok1.p};
> identifier r1.i;
> @@
> i@p
> 
> @depends on !bad disable optional_qualifier@
> identifier r1.i;
> @@
> +const
> struct rtc_class_ops i;
> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
> Compilation was terminated while compiling the .o files for all the 
> changed .c files. Therefore file size details of the .o files 
> could not be obtained.
> 
>  drivers/rtc/rtc-au1xxx.c | 2 +-
>  drivers/rtc/rtc-bfin.c   | 2 +-
>  drivers/rtc/rtc-ls1x.c   | 2 +-
>  drivers/rtc/rtc-sh.c     | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
> 
Applied and squashed in the previous one.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

      reply	other threads:[~2017-01-11  0:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-05 17:18 Bhumika Goyal
2017-01-11  0:14 ` Alexandre Belloni [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170111001450.6kmxtinx2n2iyh5o@piout.net \
    --to=alexandre.belloni@free-electrons.com \
    --cc=a.zummo@towertech.it \
    --cc=adi-buildroot-devel@lists.sourceforge.net \
    --cc=bhumirks@gmail.com \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®