All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: dmitry.torokhov@gmail.com
Cc: linux-gpio@vger.kernel.org
Subject: [bug report] tty: st-asc: switch to using devm_gpiod_get()
Date: Fri, 13 Aug 2021 15:41:55 +0300	[thread overview]
Message-ID: <20210813124155.GA7367@kili> (raw)

Hello Dmitry Torokhov,

The patch 8c44f9b566a3: "tty: st-asc: switch to using
devm_gpiod_get()" from Jan 4, 2020, leads to the following
Smatch static checker warning:

	drivers/gpio/gpiolib.c:3066 gpiod_set_consumer_name()
	warn: sleeping in atomic context

drivers/gpio/gpiolib.c
    3062 int gpiod_set_consumer_name(struct gpio_desc *desc, const char *name)
    3063 {
    3064 	VALIDATE_DESC(desc);
    3065 	if (name) {
--> 3066 		name = kstrdup_const(name, GFP_KERNEL);

asc_set_termios() <- disables preempt
-> gpiod_set_consumer_name()

    3067 		if (!name)
    3068 			return -ENOMEM;
    3069 	}
    3070 
    3071 	kfree_const(desc->label);
    3072 	desc_set_label(desc, name);
    3073 
    3074 	return 0;
    3075 }

regards,
dan carpenter

             reply	other threads:[~2021-08-13 12:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13 12:41 Dan Carpenter [this message]
2021-08-15  0:15 ` [bug report] tty: st-asc: switch to using devm_gpiod_get() Dmitry Torokhov
  -- strict thread matches above, loose matches on Subject: below --
2022-10-26 14:05 Dan Carpenter
2022-10-26 17:33 ` Dmitry Torokhov

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=20210813124155.GA7367@kili \
    --to=dan.carpenter@oracle.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-gpio@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 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.