All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cristian Marussi <cristian.marussi@arm.com>
To: Julia Lawall <julia.lawall@inria.fr>
Cc: Cristian Marussi <cristian.marussi@arm.com>,
	Sudeep Holla <sudeep.holla@arm.com>,
	linux-kernel@vger.kernel.org, oe-kbuild-all@lists.linux.dev
Subject: Re: drivers/firmware/arm_scmi/raw_mode.c:924:8-24: WARNING: scmi_dbg_raw_mode_reset_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open. (fwd)
Date: Mon, 14 Oct 2024 11:24:47 +0100	[thread overview]
Message-ID: <Zwzxb9K3FzbqVy9t@pluto> (raw)
In-Reply-To: <1bb364cc-d167-4ef8-9d94-29b1774068f8@inria.fr>

On Wed, Oct 02, 2024 at 09:36:51AM +0200, Julia Lawall wrote:
> Hello,
> 
> I'm just forwarding this for your consideration. I don't know about this
> issue.
> 

Hi Julia,

thanks for letting me know and sorry for the delay in this answer...
...I'll have a look at this soon(-ish)

Thanks,
Cristian

> julia
> 
> ---------- Forwarded message ----------
> Date: Wed, 2 Oct 2024 05:16:38 +0800
> From: kernel test robot <lkp@intel.com>
> To: oe-kbuild@lists.linux.dev
> Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
> Subject: drivers/firmware/arm_scmi/raw_mode.c:924:8-24: WARNING:
>     scmi_dbg_raw_mode_reset_fops: .write() has stream semantic; safe to change
>     nonseekable_open -> stream_open.
> 
> BCC: lkp@intel.com
> CC: oe-kbuild-all@lists.linux.dev
> CC: linux-kernel@vger.kernel.org
> TO: Cristian Marussi <cristian.marussi@arm.com>
> CC: Sudeep Holla <sudeep.holla@arm.com>
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   e32cde8d2bd7d251a8f9b434143977ddf13dcec6
> commit: b70c7996d4ffb2e02895132e8a79a37cee66504f firmware: arm_scmi: Make raw debugfs entries non-seekable
> date:   6 months ago
> :::::: branch date: 25 hours ago
> :::::: commit date: 6 months ago
> config: arm64-randconfig-r053-20241001 (https://download.01.org/0day-ci/archive/20241002/202410020543.MuCto6Eo-lkp@intel.com/config)
> compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 7773243d9916f98ba0ffce0c3a960e4aa9f03e81)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Reported-by: Julia Lawall <julia.lawall@inria.fr>
> | Closes: https://lore.kernel.org/r/202410020543.MuCto6Eo-lkp@intel.com/
> 
> cocci warnings: (new ones prefixed by >>)
> >> drivers/firmware/arm_scmi/raw_mode.c:924:8-24: WARNING: scmi_dbg_raw_mode_reset_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
> 
> vim +924 drivers/firmware/arm_scmi/raw_mode.c
> 
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  886
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  887  static int scmi_dbg_raw_mode_open(struct inode *inode, struct file *filp)
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  888  {
> 7860701d1e6e6e Cristian Marussi 2023-01-18  889  	u8 id;
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  890  	struct scmi_raw_mode_info *raw;
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  891  	struct scmi_dbg_raw_data *rd;
> 7860701d1e6e6e Cristian Marussi 2023-01-18  892  	const char *id_str = filp->f_path.dentry->d_parent->d_name.name;
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  893
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  894  	if (!inode->i_private)
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  895  		return -ENODEV;
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  896
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  897  	raw = inode->i_private;
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  898  	rd = kzalloc(sizeof(*rd), GFP_KERNEL);
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  899  	if (!rd)
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  900  		return -ENOMEM;
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  901
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  902  	rd->rx.len = raw->desc->max_msg_size + sizeof(u32);
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  903  	rd->rx.buf = kzalloc(rd->rx.len, GFP_KERNEL);
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  904  	if (!rd->rx.buf) {
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  905  		kfree(rd);
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  906  		return -ENOMEM;
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  907  	}
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  908
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  909  	rd->tx.len = raw->desc->max_msg_size + sizeof(u32);
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  910  	rd->tx.buf = kzalloc(rd->tx.len, GFP_KERNEL);
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  911  	if (!rd->tx.buf) {
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  912  		kfree(rd->rx.buf);
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  913  		kfree(rd);
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  914  		return -ENOMEM;
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  915  	}
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  916
> 7860701d1e6e6e Cristian Marussi 2023-01-18  917  	/* Grab channel ID from debugfs entry naming if any */
> 7860701d1e6e6e Cristian Marussi 2023-01-18  918  	if (!kstrtou8(id_str, 16, &id))
> 7860701d1e6e6e Cristian Marussi 2023-01-18  919  		rd->chan_id = id;
> 7860701d1e6e6e Cristian Marussi 2023-01-18  920
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  921  	rd->raw = raw;
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  922  	filp->private_data = rd;
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  923
> b70c7996d4ffb2 Cristian Marussi 2024-03-15 @924  	return nonseekable_open(inode, filp);
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  925  }
> 3c3d818a9317a5 Cristian Marussi 2023-01-18  926
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki

      reply	other threads:[~2024-10-14 10:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-02  7:36 drivers/firmware/arm_scmi/raw_mode.c:924:8-24: WARNING: scmi_dbg_raw_mode_reset_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open. (fwd) Julia Lawall
2024-10-14 10:24 ` Cristian Marussi [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=Zwzxb9K3FzbqVy9t@pluto \
    --to=cristian.marussi@arm.com \
    --cc=julia.lawall@inria.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sudeep.holla@arm.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.