All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ziheng Wei" <zihengw03@163.com>
Cc: linux-leds@vger.kernel.org, lee@kernel.org
Subject: Re: [PATCH] leds: lm3642: Fix container_of() member confusion in pin attributes
Date: Sun, 15 Nov 2026 08:06:55 +0000	[thread overview]
Message-ID: <sashiko-outbox-215283@kernel.org> (raw)
In-Reply-To: <20261115080213.910112-1-zihengw03@163.com>

> The strobe_pin and torch_pin sysfs attributes are registered on the
> flash and torch LED class devices respectively, but their store
> callbacks recover the chip data by container_of() on cdev_indicator.
> 
> dev_get_drvdata() in the attribute callbacks returns the led_classdev
> that owns the attribute group:
> 
>   - strobe_pin is in lm3642_flash_groups, so drvdata is &chip->cdev_flash
>   - torch_pin is in lm3642_torch_groups, so drvdata is &chip->cdev_torch
> 
> Both strobe_pin_store() and torch_pin_store() however use
> container_of(led_cdev, struct lm3642_chip_data, cdev_indicator).
> 
> cdev_indicator comes after cdev_flash and cdev_torch in struct
> lm3642_chip_data, so the resulting pointer lands before the start of
> [ ... ]
> no in-tree board provides lm3642 platform data.
> 
> Fixes: 8b7cfbec052d ("leds: Add new LED driver for lm3642 chips")
> Cc: stable@vger.kernel.org
> Signed-off-by: Ziheng Wei <zihengw03@163.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261115080213.910112-1-zihengw03@163.com?part=1


      reply	other threads:[~2026-11-15  8:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-15  8:02 [PATCH] leds: lm3642: Fix container_of() member confusion in pin attributes Ziheng Wei
2026-11-15  8:06 ` sashiko-bot [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=sashiko-outbox-215283@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=zihengw03@163.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.