All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: RAKHI SHARMA <rakhish1994@gmail.com>
Cc: outreachy-kernel@googlegroups.com,
	Julia Lawall <Julia.Lawall@lip6.fr>,
	Daniel Baluta <daniel.baluta@gmail.com>,
	gregkh@linuxfoundation.org
Subject: Re: [Outreachy kernel] [PATCH] drivers: staging: lustre: lustre: lov: lov_pool: Fixed a warning
Date: Wed, 10 Feb 2016 13:07:47 +0530	[thread overview]
Message-ID: <20160210073747.GA24358@sudip-pc> (raw)
In-Reply-To: <CAMnyiXsk1P19XHUCx11=s+RtwXSDL-fMxAJdkSaaqdrD6hFSyw@mail.gmail.com>

On Wed, Feb 10, 2016 at 12:24:56PM +0530, RAKHI SHARMA wrote:
> On Wed, Feb 10, 2016 at 11:44 AM, Sudip Mukherjee <
> sudipm.mukherjee@gmail.com> wrote:
> 
> > On Wed, Feb 10, 2016 at 05:28:46AM +0530, Rakhi Sharma wrote:
> > > Fixed a checkpatch warning.
> > > WARNING: struct file_operations should normally be const
> > >
> > > Signed-off-by: Rakhi Sharma <rakhish1994@gmail.com>
> > > ---
> >
> > It now adds new build warning:
> >
> > ../drivers/staging/lustre/lustre/lov/lov_pool.c: In function
> > ‘lov_pool_new’:
> > ../drivers/staging/lustre/lustre/lov/lov_pool.c:438:7: warning: passing
> > argument 4 of ‘ldebugfs_add_simple’ discards ‘const’ qualifier from pointer
> > target type [enabled by default]
> >        &pool_proc_operations);
> >        ^
> > In file included from
> > ../drivers/staging/lustre/lustre/lov/../include/linux/../obd_support.h:43:0,
> >                  from
> > ../drivers/staging/lustre/lustre/lov/../include/linux/obd.h:44,
> >                  from
> > ../drivers/staging/lustre/lustre/lov/../include/obd.h:40,
> >                  from ../drivers/staging/lustre/lustre/lov/lov_pool.c:49:
> > ../drivers/staging/lustre/lustre/lov/../include/linux/../lprocfs_status.h:547:16:
> > note: expected ‘struct file_operations *’ but argument is of type ‘const
> > struct file_operations *’
> >  struct dentry *ldebugfs_add_simple(struct dentry *root,
> >
> > regards
> >
> hi Sudip,
> Will you please help me to understand why this warning produce? Is the
> const I have put there is wrong? but as I think it is ok there.may be I am
> wrong this side, please let me know how this is going on?

you should have also made it as const in the argument of
ldebugfs_add_simple() in
drivers/staging/lustre/lustre/include/lprocfs_status.h.

regards
sudip


  parent reply	other threads:[~2016-02-10  7:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 23:58 [PATCH] drivers: staging: lustre: lustre: lov: lov_pool: Fixed a warning Rakhi Sharma
2016-02-10  6:14 ` [Outreachy kernel] " Sudip Mukherjee
2016-02-10  6:54   ` RAKHI SHARMA
2016-02-10  7:03     ` Julia Lawall
2016-02-10  7:37     ` Sudip Mukherjee [this message]
2016-02-10  7:23 ` Julia Lawall

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=20160210073747.GA24358@sudip-pc \
    --to=sudipm.mukherjee@gmail.com \
    --cc=Julia.Lawall@lip6.fr \
    --cc=daniel.baluta@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=rakhish1994@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.