mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Matias Bjørling" <mb@lightnvm.io>
To: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>,
	linux-nvme@lists.indradead.org,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] lightnvm: use kobj_to_dev()
Date: Mon, 22 Feb 2021 08:35:26 +0100	[thread overview]
Message-ID: <1bae7eca-c41a-28ed-f575-e9891b4ce45d@lightnvm.io> (raw)
In-Reply-To: <20210222060650.45373-1-chaitanya.kulkarni@wdc.com>

On 22/02/2021 07.06, Chaitanya Kulkarni wrote:
> This fixs coccicheck warning:-
>
> drivers/nvme//host/lightnvm.c:1243:60-61: WARNING opportunity for
> kobj_to_dev()
>
> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
> ---
>   drivers/nvme/host/lightnvm.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
> index b705988629f2..e3240d189093 100644
> --- a/drivers/nvme/host/lightnvm.c
> +++ b/drivers/nvme/host/lightnvm.c
> @@ -1240,7 +1240,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;

Thanks, Chaitanya. I'll pull it in.


           reply	other threads:[~2021-02-22  7:36 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20210222060650.45373-1-chaitanya.kulkarni@wdc.com>]

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=1bae7eca-c41a-28ed-f575-e9891b4ce45d@lightnvm.io \
    --to=mb@lightnvm.io \
    --cc=chaitanya.kulkarni@wdc.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.indradead.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

all inboxes | Powered by JetHome®