From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: Julia Lawall <julia.lawall@inria.fr>
Cc: linux-fbdev@vger.kernel.org, kbuild-all@lists.01.org,
Bernie Thompson <bernie@plugable.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Denis Efremov <efremov@linux.com>
Subject: Re: [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings
Date: Tue, 08 Sep 2020 11:37:40 +0000 [thread overview]
Message-ID: <9e553578-a8dd-847e-0d19-8c34ce4bf1bc@samsung.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2008262252270.2522@hadrien>
On 8/26/20 10:54 PM, Julia Lawall wrote:
> From: kernel test robot <lkp@intel.com>
>
> Use kobj_to_dev() instead of container_of()
>
> Generated by: scripts/coccinelle/api/kobj_to_dev.cocci
>
> Fixes: a2fc3718bc22 ("coccinelle: api: add kobj_to_dev.cocci script")
> CC: Denis Efremov <efremov@linux.com>
> Signed-off-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
Applied to drm-misc-next tree, thanks.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
> ---
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux.git for-5.10
> head: a2fc3718bc22e85378085568ecc5765fb28cabce
> commit: a2fc3718bc22e85378085568ecc5765fb28cabce [3/3] coccinelle: api: add kobj_to_dev.cocci script
> :::::: branch date: 5 days ago
> :::::: commit date: 5 days ago
>
> udlfb.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> --- a/drivers/video/fbdev/udlfb.c
> +++ b/drivers/video/fbdev/udlfb.c
> @@ -1457,7 +1457,7 @@ static ssize_t edid_show(
> struct file *filp,
> struct kobject *kobj, struct bin_attribute *a,
> char *buf, loff_t off, size_t count) {
> - struct device *fbdev = container_of(kobj, struct device, kobj);
> + struct device *fbdev = kobj_to_dev(kobj);
> struct fb_info *fb_info = dev_get_drvdata(fbdev);
> struct dlfb_data *dlfb = fb_info->par;
>
> @@ -1479,7 +1479,7 @@ static ssize_t edid_store(
> struct file *filp,
> struct kobject *kobj, struct bin_attribute *a,
> char *src, loff_t src_off, size_t src_size) {
> - struct device *fbdev = container_of(kobj, struct device, kobj);
> + struct device *fbdev = kobj_to_dev(kobj);
> struct fb_info *fb_info = dev_get_drvdata(fbdev);
> struct dlfb_data *dlfb = fb_info->par;
> int ret;
>
next prev parent reply other threads:[~2020-09-08 11:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200826205412eucas1p16c748e9d73f4cd924aae1d6386ab450c@eucas1p1.samsung.com>
2020-08-26 20:54 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings Julia Lawall
2020-09-08 11:37 ` Bartlomiej Zolnierkiewicz [this message]
[not found] <13cd8bf4-06f9-04d7-e923-c397c506e8cc@web.de>
2020-08-27 20:05 ` 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=9e553578-a8dd-847e-0d19-8c34ce4bf1bc@samsung.com \
--to=b.zolnierkie@samsung.com \
--cc=bernie@plugable.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=efremov@linux.com \
--cc=julia.lawall@inria.fr \
--cc=kbuild-all@lists.01.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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