public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Ayush Mukkanwar <ayushmukkanwar@gmail.com>
To: gregkh@linuxfoundation.org
Cc: error27@gmail.com, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org, ayushmukkanwar@gmail.com
Subject: [PATCH v5 0/4] staging: octeon: modernize logging and refactor to per-device state
Date: Mon, 27 Apr 2026 20:45:51 +0530	[thread overview]
Message-ID: <20260427151556.91153-1-ayushmukkanwar@gmail.com> (raw)

This series modernizes the logging infrastructure in the Octeon ethernet
staging driver by replacing pr_warn(), pr_err(), and pr_info() calls with
their device-aware counterparts (dev_warn(), dev_err(), netdev_err(), and
netdev_info()), and refactors driver state to be per-device.

Patches 1-3 convert logging calls to include device context in messages.
Patch 4 moves the static rx group array into the platform device private
structure and passes struct platform_device through the call chains
instead of struct device.

Changes in v5:
- Pass struct platform_device instead of struct device through
  ethernet-mem and ethernet-rx call chains (Greg)
- Move static oct_rx_group[16] array into the platform device
  private structure to eliminate file-scoped global state (Greg)
- Update kdoc parameter names to match renamed parameters

Changes in v4:
- Broke the series into much smaller, focused patches to ease review
- Removed the global cvm_oct_rx_refill_work by introducing a per-device
  struct octeon_ethernet_platform, allocated during probe
- Retrieved the device pointer via platform_get_drvdata() and passed it
  down the call chain (NAPI poll -> rx refill -> mem free/fill) as the
  first argument to avoid global state
- Note: Dropped the ethernet-spi.c IRQ handler conversions from this
  series for now, as those errors are SPI4 bus-level

Changes in v3:
- Use netdev_err() instead of dev_err() in ethernet-spi.c
- Pass the netdev pointer directly to request_irq/free_irq
  instead of dev->dev.parent
- Move the device pointer to be the first argument in helper
  functions
- Fix checkpatch alignment and line-length warnings
- Add missing @dev kernel-doc parameter descriptions
- Wrap commit message body to 75 characters
- Fix author name formatting

Changes in v2:
- Instead of adding pr_fmt() macros, replace pr_*() calls with
  proper dev_*() and netdev_*() calls
- Thread device pointer through call chains via function parameters
- Introduce struct octeon_ethernet_platform to pass device pointer
  through work queue callbacks via container_of
- Store device pointer in oct_rx_group for NAPI poll functions
- Use dev_id in interrupt handler to pass and retrieve device pointer

Ayush Mukkanwar (4):
  staging: octeon: ethernet-mem: replace pr_warn with dev_warn in free
    functions
  staging: octeon: replace pr_warn with dev_warn in fill path
  staging: octeon: ethernet: replace pr_err and pr_info with dev_err and
    netdev_err
  staging: octeon: refactor to per-device state and pass platform_device

 drivers/staging/octeon/ethernet-mem.c    | 44 +++++++++-------
 drivers/staging/octeon/ethernet-mem.h    |  8 ++-
 drivers/staging/octeon/ethernet-rx.c     | 49 +++++++++---------
 drivers/staging/octeon/ethernet-rx.h     | 11 ++--
 drivers/staging/octeon/ethernet.c        | 64 ++++++++++++++----------
 drivers/staging/octeon/octeon-ethernet.h | 18 ++++++-
 6 files changed, 116 insertions(+), 78 deletions(-)

--
2.53.0


             reply	other threads:[~2026-04-27 15:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-27 15:15 Ayush Mukkanwar [this message]
2026-04-27 15:15 ` [PATCH v5 1/4] staging: octeon: ethernet-mem: replace pr_warn with dev_warn in free functions Ayush Mukkanwar
2026-05-04 14:20   ` Greg KH
2026-04-27 15:15 ` [PATCH v5 2/4] staging: octeon: replace pr_warn with dev_warn in fill path Ayush Mukkanwar
2026-05-04 14:21   ` Greg KH
2026-05-04 17:04     ` Ayush Mukkanwar
2026-04-27 15:15 ` [PATCH v5 3/4] staging: octeon: ethernet: replace pr_err and pr_info with dev_err and netdev_err Ayush Mukkanwar
2026-04-27 15:15 ` [PATCH v5 4/4] staging: octeon: refactor to per-device state and pass platform_device Ayush Mukkanwar
2026-04-28  9:48   ` Dan Carpenter
2026-04-28 14:31     ` Ayush Mukkanwar

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=20260427151556.91153-1-ayushmukkanwar@gmail.com \
    --to=ayushmukkanwar@gmail.com \
    --cc=error27@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /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