Thread (15 messages) 15 messages, 2 authors, 2021-08-09

Re: [PATCH v4 03/10] libata: fix sparse warning

From: Hannes Reinecke <hare@suse.de>
Date: 2021-08-09 06:10:47
Also in: linux-block, linux-ide

On 8/7/21 6:18 AM, Damien Le Moal wrote:
Sparse complains about context imbalance in ata_scsi_rbuf_get() and
ata_scsi_rbuf_put() due to these functions respectively only taking
and releasing the ata_scsi_rbuf_lock spinlock. Since these functions are
only called from ata_scsi_rbuf_fill() with ata_scsi_rbuf_get() being
called with a copy_in argument always false, the code can be simplified
and ata_scsi_rbuf_{get|put} removed. This change both simplifies the
code and fixes the sparse warning.

Signed-off-by: Damien Le Moal <redacted>
---
  drivers/ata/libata-scsi.c | 60 ++++++---------------------------------
  1 file changed, 9 insertions(+), 51 deletions(-)
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help