All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
	 Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
	 linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, Denis Efremov <efremov@linux.com>
Subject: [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings
Date: Thu, 27 Aug 2020 22:13:40 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2008272211260.2482@hadrien> (raw)

Use kobj_to_dev() instead of container_of()

Generated by: scripts/coccinelle/api/kobj_to_dev.cocci

CC: Denis Efremov <efremov@linux.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---

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

 lightnvm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/nvme/host/lightnvm.c
+++ b/drivers/nvme/host/lightnvm.c
@@ -1241,7 +1241,7 @@ static struct attribute *nvm_dev_attrs[]
 static umode_t nvm_dev_attrs_visible(struct kobject *kobj,
 				     struct attribute *attr, int index)
 {
-	struct device *dev = container_of(kobj, struct device, kobj);
+	struct device *dev = kobj_to_dev(kobj);
 	struct gendisk *disk = dev_to_disk(dev);
 	struct nvme_ns *ns = disk->private_data;
 	struct nvm_dev *ndev = ns->ndev;

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <julia.lawall@inria.fr>
To: kbuild-all@lists.01.org
Subject: [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings
Date: Thu, 27 Aug 2020 22:13:40 +0200	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2008272211260.2482@hadrien> (raw)

[-- Attachment #1: Type: text/plain, Size: 1106 bytes --]

Use kobj_to_dev() instead of container_of()

Generated by: scripts/coccinelle/api/kobj_to_dev.cocci

CC: Denis Efremov <efremov@linux.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---

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

 lightnvm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/nvme/host/lightnvm.c
+++ b/drivers/nvme/host/lightnvm.c
@@ -1241,7 +1241,7 @@ static struct attribute *nvm_dev_attrs[]
 static umode_t nvm_dev_attrs_visible(struct kobject *kobj,
 				     struct attribute *attr, int index)
 {
-	struct device *dev = container_of(kobj, struct device, kobj);
+	struct device *dev = kobj_to_dev(kobj);
 	struct gendisk *disk = dev_to_disk(dev);
 	struct nvme_ns *ns = disk->private_data;
 	struct nvm_dev *ndev = ns->ndev;

WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <julia.lawall@inria.fr>
To: Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
	Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
	linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: Denis Efremov <efremov@linux.com>, kbuild-all@lists.01.org
Subject: [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings
Date: Thu, 27 Aug 2020 22:13:40 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2008272211260.2482@hadrien> (raw)

Use kobj_to_dev() instead of container_of()

Generated by: scripts/coccinelle/api/kobj_to_dev.cocci

CC: Denis Efremov <efremov@linux.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---

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

 lightnvm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/nvme/host/lightnvm.c
+++ b/drivers/nvme/host/lightnvm.c
@@ -1241,7 +1241,7 @@ static struct attribute *nvm_dev_attrs[]
 static umode_t nvm_dev_attrs_visible(struct kobject *kobj,
 				     struct attribute *attr, int index)
 {
-	struct device *dev = container_of(kobj, struct device, kobj);
+	struct device *dev = kobj_to_dev(kobj);
 	struct gendisk *disk = dev_to_disk(dev);
 	struct nvme_ns *ns = disk->private_data;
 	struct nvm_dev *ndev = ns->ndev;

             reply	other threads:[~2020-08-27 20:13 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-27 20:13 Julia Lawall [this message]
2020-08-27 20:13 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings Julia Lawall
2020-08-27 20:13 ` Julia Lawall
2020-08-27 22:24 ` Jens Axboe
2020-08-27 22:24   ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2021-07-05 11:59 drivers/scsi/ipr.c:4209:61-62: WARNING opportunity for kobj_to_dev() kernel test robot
2021-07-05 11:59 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2021-04-03  0:10 drivers/nvdimm/region_devs.c:762:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2021-04-03  0:10 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2021-03-31 20:25 drivers/scsi/ipr.c:4209:61-62: WARNING opportunity for kobj_to_dev() kernel test robot
2021-03-31 20:25 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2021-03-16 22:20 drivers/platform/x86/asus-laptop.c:1572:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2021-03-16 22:21 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2021-03-10  0:31 drivers/input/misc/ims-pcu.c:1231:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2021-03-10  0:31 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2021-03-10  0:31 ` kernel test robot
2021-01-08  9:40 drivers/nvdimm/namespace_devs.c:1626:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2021-01-08  9:40 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2021-01-01  9:01 drivers/platform/x86/ideapad-laptop.c:522:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2021-01-01  9:01 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-12-21  6:39 drivers/mfd/lm3533-core.c:361:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-12-21  6:39 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-12-21  6:38 drivers/mfd/lm3533-core.c:361:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-12-21  6:38 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-12-20 11:36 drivers/mfd/lm3533-core.c:361:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-12-20 11:36 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-12-15  9:25 drivers/nvdimm/namespace_devs.c:1626:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-12-15  9:25 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-12-10  5:15 drivers/scsi/esas2r/esas2r_main.c:62:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-12-10  5:15 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-12-03  1:10 drivers/scsi/3w-sas.c:102:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-12-03  1:10 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-11-23 22:20 drivers/scsi/scsi_transport_spi.c:1460:61-62: WARNING opportunity for kobj_to_dev() kernel test robot
2020-11-23 22:20 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-11-20 11:00 drivers/scsi/scsi_transport_iscsi.c:4041:61-62: WARNING opportunity for kobj_to_dev() kernel test robot
2020-11-20 11:00 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-11-16 13:14 drivers/nvdimm/namespace_devs.c:1626:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-11-16 13:14 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-11-13  8:52 drivers/hwmon/pwm-fan.c:150:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-11-13  8:52 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-11-11  9:50 drivers/nvme/host/lightnvm.c:1244:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-11-11  9:50 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-10-02 15:06 [jlawall:for-5.10 3/10] drivers/nvme/host/core.c:3646:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-10-02 15:06 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-10-02 15:06 ` kernel test robot
2020-10-02 15:06 ` kernel test robot
2020-10-02 15:06 ` kernel test robot
2020-10-02 15:06 ` kernel test robot
2020-10-02 15:06 ` kernel test robot
2020-10-02 15:06 ` kernel test robot
2020-10-02 15:06 ` kernel test robot
2020-10-02 15:06 ` kernel test robot
2020-10-02 15:06 ` kernel test robot
2020-09-28  2:40 [jlawall:for-5.10 3/9] drivers/block/virtio_blk.c:634:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-09-28  2:40 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-09-01  9:46 [jlawall:for-5.10 3/4] drivers/iio/adc/adi-axi-adc.c:279:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-09-01  9:46 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-09-01  9:46 ` kernel test robot
2020-09-01  9:46 ` kernel test robot
2020-09-01  9:46 ` kernel test robot
2020-09-01  9:46 ` kernel test robot
2020-09-01  9:46 ` kernel test robot
2020-09-01  9:46 ` kernel test robot
2020-09-01  9:46 ` kernel test robot
2020-09-01  9:46 ` kernel test robot
2020-09-01  9:46 ` kernel test robot
2020-09-01  9:46 ` kernel test robot
2020-09-01  9:46 ` kernel test robot
2020-08-27 17:03 Markus Elfring
2020-08-27 20:05 ` Julia Lawall
2020-08-27 20:05   ` Julia Lawall
2020-08-27 20:05   ` Julia Lawall
2020-08-27 20:05   ` Julia Lawall
2020-08-28 16:52   ` Markus Elfring
2020-08-28 16:52     ` Markus Elfring
2020-08-26 23:27 [jlawall:for-5.10 3/3] drivers/scsi/3w-sas.c:102:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-08-26 23:27 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-08-26 23:27 ` kernel test robot
2020-08-26 23:27 ` kernel test robot
2020-08-26 23:27 ` kernel test robot
2020-08-26 23:27 ` kernel test robot
2020-08-26 23:27 ` kernel test robot
     [not found] <CGME20200826205412eucas1p16c748e9d73f4cd924aae1d6386ab450c@eucas1p1.samsung.com>
2020-08-26 20:54 ` Julia Lawall
2020-08-26 20:54   ` Julia Lawall
2020-08-26 20:54   ` Julia Lawall
2020-08-26 20:54   ` Julia Lawall
2020-09-08 11:37   ` Bartlomiej Zolnierkiewicz
2020-09-08 11:37     ` Bartlomiej Zolnierkiewicz
2020-09-08 11:37     ` Bartlomiej Zolnierkiewicz
2020-09-08 11:37     ` Bartlomiej Zolnierkiewicz
2020-08-26 19:51 [jlawall:for-5.10 3/3] drivers/video/fbdev/udlfb.c:1460:62-63: WARNING opportunity for kobj_to_dev() kernel test robot
2020-08-26 19:51 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot

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=alpine.DEB.2.22.394.2008272211260.2482@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=axboe@kernel.dk \
    --cc=efremov@linux.com \
    --cc=hch@lst.de \
    --cc=kbuild-all@lists.01.org \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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.