public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v3] staging: most: dim2: convert pr_info/err/warn to dev_info/err/warn
@ 2026-02-07  2:34 Zeeshan Ahmad
  2026-02-07  5:19 ` Ethan Tidmore
  2026-02-07 11:56 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 4+ messages in thread
From: Zeeshan Ahmad @ 2026-02-07  2:34 UTC (permalink / raw)
  To: Parthiban Veerasooran, Christian Gromm, Greg Kroah-Hartman
  Cc: Dan Carpenter, Ethan Tidmore, linux-staging, linux-kernel,
	Zeeshan Ahmad

The dim2 driver currently uses generic pr_* logging macros. Hardware
drivers should use the device-specific dev_* logging macros to provide
better context in the system logs, especially in systems with multiple
controller instances.

This patch converts all applicable logging calls in dim2.c to use the
proper device-specific APIs.

Signed-off-by: Zeeshan Ahmad <zeeshanahmad022019@gmail.com>
---
v3:
 - Removed "staging-next" and redundant "[PATCH]" from the subject line.
 - Shortened commit message lines to stay under 75 characters.
 - Added this changelog below the "---" as suggested by Ethan Tidmore.
 - Cleaned up temporary submission notes from the permanent commit body.
v2:
 - Rebased against the staging-next branch.
 - Fixed CC list to include relevant maintainers.

 drivers/staging/most/dim2/dim2.c | 44 ++++++++++++++++----------------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c
index 80af965356d0..4bcafda481f9 100644
--- a/drivers/staging/most/dim2/dim2.c
+++ b/drivers/staging/most/dim2/dim2.c
@@ -246,9 +246,9 @@ static void retrieve_netinfo(struct dim2_hdm *dev, struct mbo *mbo)
 {
 	u8 *data = mbo->virt_address;
 
-	pr_info("Node Address: 0x%03x\n", (u16)data[16] << 8 | data[17]);
+	dev_info(&dev->dev, "Node Address: 0x%03x\n", (u16)data[16] << 8 | data[17]);
 	dev->link_state = data[18];
-	pr_info("NIState: %d\n", dev->link_state);
+	dev_info(&dev->dev, "NIState: %d\n", dev->link_state);
 	memcpy(dev->mac_addrs, data + 19, 6);
 	dev->deliver_netinfo++;
 	wake_up_interruptible(&dev->netinfo_waitq);
@@ -472,13 +472,13 @@ static int configure_channel(struct most_interface *most_iface, int ch_idx,
 	case MOST_CH_CONTROL:
 		new_size = dim_norm_ctrl_async_buffer_size(buf_size);
 		if (new_size == 0) {
-			pr_err("%s: too small buffer size\n", hdm_ch->name);
+			dev_err(&dev->dev, "%s: too small buffer size\n", hdm_ch->name);
 			return -EINVAL;
 		}
 		ccfg->buffer_size = new_size;
 		if (new_size != buf_size)
-			pr_warn("%s: fixed buffer size (%d -> %d)\n",
-				hdm_ch->name, buf_size, new_size);
+			dev_warn(&dev->dev, "%s: fixed buffer size (%d -> %d)\n",
+				 hdm_ch->name, buf_size, new_size);
 		spin_lock_irqsave(&dim_lock, flags);
 		hal_ret = dim_init_control(&hdm_ch->ch, is_tx, ch_addr,
 					   is_tx ? new_size * 2 : new_size);
@@ -486,13 +486,13 @@ static int configure_channel(struct most_interface *most_iface, int ch_idx,
 	case MOST_CH_ASYNC:
 		new_size = dim_norm_ctrl_async_buffer_size(buf_size);
 		if (new_size == 0) {
-			pr_err("%s: too small buffer size\n", hdm_ch->name);
+			dev_err(&dev->dev, "%s: too small buffer size\n", hdm_ch->name);
 			return -EINVAL;
 		}
 		ccfg->buffer_size = new_size;
 		if (new_size != buf_size)
-			pr_warn("%s: fixed buffer size (%d -> %d)\n",
-				hdm_ch->name, buf_size, new_size);
+			dev_warn(&dev->dev, "%s: fixed buffer size (%d -> %d)\n",
+				 hdm_ch->name, buf_size, new_size);
 		spin_lock_irqsave(&dim_lock, flags);
 		hal_ret = dim_init_async(&hdm_ch->ch, is_tx, ch_addr,
 					 is_tx ? new_size * 2 : new_size);
@@ -500,41 +500,41 @@ static int configure_channel(struct most_interface *most_iface, int ch_idx,
 	case MOST_CH_ISOC:
 		new_size = dim_norm_isoc_buffer_size(buf_size, sub_size);
 		if (new_size == 0) {
-			pr_err("%s: invalid sub-buffer size or too small buffer size\n",
-			       hdm_ch->name);
+			dev_err(&dev->dev, "%s: invalid sub-buffer size or too small buffer size\n",
+				hdm_ch->name);
 			return -EINVAL;
 		}
 		ccfg->buffer_size = new_size;
 		if (new_size != buf_size)
-			pr_warn("%s: fixed buffer size (%d -> %d)\n",
-				hdm_ch->name, buf_size, new_size);
+			dev_warn(&dev->dev, "%s: fixed buffer size (%d -> %d)\n",
+				 hdm_ch->name, buf_size, new_size);
 		spin_lock_irqsave(&dim_lock, flags);
 		hal_ret = dim_init_isoc(&hdm_ch->ch, is_tx, ch_addr, sub_size);
 		break;
 	case MOST_CH_SYNC:
 		new_size = dim_norm_sync_buffer_size(buf_size, sub_size);
 		if (new_size == 0) {
-			pr_err("%s: invalid sub-buffer size or too small buffer size\n",
-			       hdm_ch->name);
+			dev_err(&dev->dev, "%s: invalid sub-buffer size or too small buffer size\n",
+				hdm_ch->name);
 			return -EINVAL;
 		}
 		ccfg->buffer_size = new_size;
 		if (new_size != buf_size)
-			pr_warn("%s: fixed buffer size (%d -> %d)\n",
-				hdm_ch->name, buf_size, new_size);
+			dev_warn(&dev->dev, "%s: fixed buffer size (%d -> %d)\n",
+				 hdm_ch->name, buf_size, new_size);
 		spin_lock_irqsave(&dim_lock, flags);
 		hal_ret = dim_init_sync(&hdm_ch->ch, is_tx, ch_addr, sub_size);
 		break;
 	default:
-		pr_err("%s: configure failed, bad channel type: %d\n",
-		       hdm_ch->name, ccfg->data_type);
+		dev_err(&dev->dev, "%s: configure failed, bad channel type: %d\n",
+			hdm_ch->name, ccfg->data_type);
 		return -EINVAL;
 	}
 
 	if (hal_ret != DIM_NO_ERROR) {
 		spin_unlock_irqrestore(&dim_lock, flags);
-		pr_err("%s: configure failed (%d), type: %d, is_tx: %d\n",
-		       hdm_ch->name, hal_ret, ccfg->data_type, (int)is_tx);
+		dev_err(&dev->dev, "%s: configure failed (%d), type: %d, is_tx: %d\n",
+			hdm_ch->name, hal_ret, ccfg->data_type, (int)is_tx);
 		return -ENODEV;
 	}
 
@@ -608,7 +608,7 @@ static void request_netinfo(struct most_interface *most_iface, int ch_idx,
 		return;
 
 	if (dev->atx_idx < 0) {
-		pr_err("Async Tx Not initialized\n");
+		dev_err(&dev->dev, "Async Tx Not initialized\n");
 		return;
 	}
 
@@ -657,7 +657,7 @@ static int poison_channel(struct most_interface *most_iface, int ch_idx)
 		dev->atx_idx = -1;
 	spin_unlock_irqrestore(&dim_lock, flags);
 	if (hal_ret != DIM_NO_ERROR) {
-		pr_err("HAL Failed to close channel %s\n", hdm_ch->name);
+		dev_err(&dev->dev, "HAL Failed to close channel %s\n", hdm_ch->name);
 		ret = -EFAULT;
 	}
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] staging: most: dim2: convert pr_info/err/warn to dev_info/err/warn
  2026-02-07  2:34 [PATCH v3] staging: most: dim2: convert pr_info/err/warn to dev_info/err/warn Zeeshan Ahmad
@ 2026-02-07  5:19 ` Ethan Tidmore
  2026-02-07 11:56 ` Greg Kroah-Hartman
  1 sibling, 0 replies; 4+ messages in thread
From: Ethan Tidmore @ 2026-02-07  5:19 UTC (permalink / raw)
  To: Zeeshan Ahmad, Parthiban Veerasooran, Christian Gromm,
	Greg Kroah-Hartman
  Cc: Dan Carpenter, Ethan Tidmore, linux-staging, linux-kernel

On Fri Feb 6, 2026 at 8:34 PM CST, Zeeshan Ahmad wrote:
> The dim2 driver currently uses generic pr_* logging macros. Hardware
> drivers should use the device-specific dev_* logging macros to provide
> better context in the system logs, especially in systems with multiple
> controller instances.
>
> This patch converts all applicable logging calls in dim2.c to use the
> proper device-specific APIs.
>
> Signed-off-by: Zeeshan Ahmad <zeeshanahmad022019@gmail.com>
> ---
> v3:
>  - Removed "staging-next" and redundant "[PATCH]" from the subject line.
>  - Shortened commit message lines to stay under 75 characters.
>  - Added this changelog below the "---" as suggested by Ethan Tidmore.
>  - Cleaned up temporary submission notes from the permanent commit body.
> v2:
>  - Rebased against the staging-next branch.
>  - Fixed CC list to include relevant maintainers.
>

LGTM.

Reviewed-by: Ethan Tidmore <ethantidmore06@gmail.com>

Thanks,

ET

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] staging: most: dim2: convert pr_info/err/warn to dev_info/err/warn
  2026-02-07  2:34 [PATCH v3] staging: most: dim2: convert pr_info/err/warn to dev_info/err/warn Zeeshan Ahmad
  2026-02-07  5:19 ` Ethan Tidmore
@ 2026-02-07 11:56 ` Greg Kroah-Hartman
  2026-02-07 11:57   ` Greg Kroah-Hartman
  1 sibling, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2026-02-07 11:56 UTC (permalink / raw)
  To: Zeeshan Ahmad
  Cc: Parthiban Veerasooran, Christian Gromm, Dan Carpenter,
	Ethan Tidmore, linux-staging, linux-kernel

On Sat, Feb 07, 2026 at 07:34:32AM +0500, Zeeshan Ahmad wrote:
> The dim2 driver currently uses generic pr_* logging macros. Hardware
> drivers should use the device-specific dev_* logging macros to provide
> better context in the system logs, especially in systems with multiple
> controller instances.
> 
> This patch converts all applicable logging calls in dim2.c to use the
> proper device-specific APIs.
> 
> Signed-off-by: Zeeshan Ahmad <zeeshanahmad022019@gmail.com>
> ---
> v3:
>  - Removed "staging-next" and redundant "[PATCH]" from the subject line.
>  - Shortened commit message lines to stay under 75 characters.
>  - Added this changelog below the "---" as suggested by Ethan Tidmore.
>  - Cleaned up temporary submission notes from the permanent commit body.
> v2:
>  - Rebased against the staging-next branch.
>  - Fixed CC list to include relevant maintainers.
> 
>  drivers/staging/most/dim2/dim2.c | 44 ++++++++++++++++----------------
>  1 file changed, 22 insertions(+), 22 deletions(-)
> 
> diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c
> index 80af965356d0..4bcafda481f9 100644
> --- a/drivers/staging/most/dim2/dim2.c
> +++ b/drivers/staging/most/dim2/dim2.c
> @@ -246,9 +246,9 @@ static void retrieve_netinfo(struct dim2_hdm *dev, struct mbo *mbo)
>  {
>  	u8 *data = mbo->virt_address;
>  
> -	pr_info("Node Address: 0x%03x\n", (u16)data[16] << 8 | data[17]);
> +	dev_info(&dev->dev, "Node Address: 0x%03x\n", (u16)data[16] << 8 | data[17]);

My review comments from your v1 patch remain the same here.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] staging: most: dim2: convert pr_info/err/warn to dev_info/err/warn
  2026-02-07 11:56 ` Greg Kroah-Hartman
@ 2026-02-07 11:57   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2026-02-07 11:57 UTC (permalink / raw)
  To: Zeeshan Ahmad
  Cc: Parthiban Veerasooran, Christian Gromm, Dan Carpenter,
	Ethan Tidmore, linux-staging, linux-kernel

On Sat, Feb 07, 2026 at 12:56:15PM +0100, Greg Kroah-Hartman wrote:
> On Sat, Feb 07, 2026 at 07:34:32AM +0500, Zeeshan Ahmad wrote:
> > The dim2 driver currently uses generic pr_* logging macros. Hardware
> > drivers should use the device-specific dev_* logging macros to provide
> > better context in the system logs, especially in systems with multiple
> > controller instances.
> > 
> > This patch converts all applicable logging calls in dim2.c to use the
> > proper device-specific APIs.
> > 
> > Signed-off-by: Zeeshan Ahmad <zeeshanahmad022019@gmail.com>
> > ---
> > v3:
> >  - Removed "staging-next" and redundant "[PATCH]" from the subject line.
> >  - Shortened commit message lines to stay under 75 characters.
> >  - Added this changelog below the "---" as suggested by Ethan Tidmore.
> >  - Cleaned up temporary submission notes from the permanent commit body.
> > v2:
> >  - Rebased against the staging-next branch.
> >  - Fixed CC list to include relevant maintainers.
> > 
> >  drivers/staging/most/dim2/dim2.c | 44 ++++++++++++++++----------------
> >  1 file changed, 22 insertions(+), 22 deletions(-)
> > 
> > diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c
> > index 80af965356d0..4bcafda481f9 100644
> > --- a/drivers/staging/most/dim2/dim2.c
> > +++ b/drivers/staging/most/dim2/dim2.c
> > @@ -246,9 +246,9 @@ static void retrieve_netinfo(struct dim2_hdm *dev, struct mbo *mbo)
> >  {
> >  	u8 *data = mbo->virt_address;
> >  
> > -	pr_info("Node Address: 0x%03x\n", (u16)data[16] << 8 | data[17]);
> > +	dev_info(&dev->dev, "Node Address: 0x%03x\n", (u16)data[16] << 8 | data[17]);
> 
> My review comments from your v1 patch remain the same here.

And note, that's the problem with going "too fast", you spent time
respinning patches without allowing others to review the original patch.
Please slow down and send updates maybe once a week.  There is no rush
here.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-07 11:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-07  2:34 [PATCH v3] staging: most: dim2: convert pr_info/err/warn to dev_info/err/warn Zeeshan Ahmad
2026-02-07  5:19 ` Ethan Tidmore
2026-02-07 11:56 ` Greg Kroah-Hartman
2026-02-07 11:57   ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox