[PATCH v2 2/3] scsi: virtio_scsi: remove unnecessary fn declaration

Joshua Daley posted 3 patches 3 weeks, 4 days ago
There is a newer version of this series
[PATCH v2 2/3] scsi: virtio_scsi: remove unnecessary fn declaration
Posted by Joshua Daley 3 weeks, 4 days ago
virtscsi_handle_event() is not used before its definition, so remove
a prior declaration.

Suggested-by: Eric Farman <farman@linux.ibm.com>
Signed-off-by: Joshua Daley <jdaley@linux.ibm.com>
---
 drivers/scsi/virtio_scsi.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index 982f49bc6c69..6efbeaa30f65 100644
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -233,8 +233,6 @@ static void virtscsi_ctrl_done(struct virtqueue *vq)
 	virtscsi_vq_done(vscsi, &vscsi->ctrl_vq, virtscsi_complete_free);
 };
 
-static void virtscsi_handle_event(struct work_struct *work);
-
 static int virtscsi_kick_event(struct virtio_scsi *vscsi,
 			       struct virtio_scsi_event_node *event_node)
 {
-- 
2.34.1
Re: [PATCH v2 2/3] scsi: virtio_scsi: remove unnecessary fn declaration
Posted by Matthew Rosato 3 weeks, 1 day ago
On 3/12/26 1:42 PM, Joshua Daley wrote:
> virtscsi_handle_event() is not used before its definition, so remove
> a prior declaration.
> 
> Suggested-by: Eric Farman <farman@linux.ibm.com>
> Signed-off-by: Joshua Daley <jdaley@linux.ibm.com>
> ---
>  drivers/scsi/virtio_scsi.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
> index 982f49bc6c69..6efbeaa30f65 100644
> --- a/drivers/scsi/virtio_scsi.c
> +++ b/drivers/scsi/virtio_scsi.c
> @@ -233,8 +233,6 @@ static void virtscsi_ctrl_done(struct virtqueue *vq)
>  	virtscsi_vq_done(vscsi, &vscsi->ctrl_vq, virtscsi_complete_free);
>  };
>  
> -static void virtscsi_handle_event(struct work_struct *work);
> -

Hi Josh,

You can't make this change until after patch 3 where you move the reference to virtscsi_handle_event further down.

In other words, if you just apply patch 1 + this patch you will get:

drivers/scsi/virtio_scsi.c:383:13: warning: ‘virtscsi_handle_event’ defined but not used [-Wunused-function]

until you also apply patch 3.  This breaks bisectability.

Please either re-arrange this series so that this is the last patch OR squash patch 2 + 3 together.

If you choose the latter approach and keep this patch then you can also include:

Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>

>  static int virtscsi_kick_event(struct virtio_scsi *vscsi,
>  			       struct virtio_scsi_event_node *event_node)
>  {

Re: [PATCH v2 2/3] scsi: virtio_scsi: remove unnecessary fn declaration
Posted by Joshua Daley 3 weeks ago
On 3/16/2026 9:55 AM, Matthew Rosato wrote:
> On 3/12/26 1:42 PM, Joshua Daley wrote:
>> virtscsi_handle_event() is not used before its definition, so remove
>> a prior declaration.
>>
>> Suggested-by: Eric Farman <farman@linux.ibm.com>
>> Signed-off-by: Joshua Daley <jdaley@linux.ibm.com>
>> ---
>>   drivers/scsi/virtio_scsi.c | 2 --
>>   1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
>> index 982f49bc6c69..6efbeaa30f65 100644
>> --- a/drivers/scsi/virtio_scsi.c
>> +++ b/drivers/scsi/virtio_scsi.c
>> @@ -233,8 +233,6 @@ static void virtscsi_ctrl_done(struct virtqueue *vq)
>>   	virtscsi_vq_done(vscsi, &vscsi->ctrl_vq, virtscsi_complete_free);
>>   };
>>   
>> -static void virtscsi_handle_event(struct work_struct *work);
>> -
> 
> Hi Josh,
> 
> You can't make this change until after patch 3 where you move the reference to virtscsi_handle_event further down.
> 
> In other words, if you just apply patch 1 + this patch you will get:
> 
> drivers/scsi/virtio_scsi.c:383:13: warning: ‘virtscsi_handle_event’ defined but not used [-Wunused-function]
> 
> until you also apply patch 3.  This breaks bisectability.
> 
> Please either re-arrange this series so that this is the last patch OR squash patch 2 + 3 together.
> 
> If you choose the latter approach and keep this patch then you can also include:
> 
> Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
> 

Thanks for catching this. I'll re-arrange the series so that this is the last patch.

>>   static int virtscsi_kick_event(struct virtio_scsi *vscsi,
>>   			       struct virtio_scsi_event_node *event_node)
>>   {
>