Thread (72 messages) flat view 72 messages, 4 authors, 9d ago

Re: [PATCH v5 35/40] usb: storage: use 16-bits defined sense codes

From: Damien Le Moal <dlemoal@kernel.org>
Date: 2026-09-08 00:27:43
Also in: linux-ide, linux-s390, linux-scsi

On 9/8/26 01:13, Johannes Thumshirn wrote:
On 9/7/26 4:43 AM, Damien Le Moal wrote:
quoted
diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/
gadget/function/f_mass_storage.c
index a50743caf083..05e138968389 100644
--- a/drivers/usb/gadget/function/f_mass_storage.c
+++ b/drivers/usb/gadget/function/f_mass_storage.c
@@ -1103,9 +1103,9 @@ static int do_request_sense(struct fsg_common *common,
struct fsg_buffhd *bh)
       * FSG normally uses option a); enable this code to use option b).
       */
  #if 0
-    if (curlun && curlun->unit_attention_data != SS_NO_SENSE) {
+    if (curlun && curlun->unit_attention_data != NO_SENSE) {
          curlun->sense_data = curlun->unit_attention_data;
-        curlun->unit_attention_data = SS_NO_SENSE;
+        curlun->unit_attention_data = NO_SENSE;
      }
  #endif
No sure how relevant it is to change something in a commented out block.
Wouldn't it be better to just remove the block?
Well, I don't really know why that block is here. Might be for some quick debug
thing, so I left it, but made sure it is also corrected so that if the #if 0 is
changed to #if 1, it still compiles.

I will let the cleanup of this, if any is needed, to the USB folks.


-- 
Damien Le Moal
Western Digital Research
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help