Patch "media: dvb: as102-fe: Fix as10x_register_addr packing" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    media: dvb: as102-fe: Fix as10x_register_addr packing

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     media-dvb-as102-fe-fix-as10x_register_addr-packing.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e11c63f8049976e2c51da812f6a283c037fdb31e
Author: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
Date:   Wed Apr 10 12:24:37 2024 +0000

    media: dvb: as102-fe: Fix as10x_register_addr packing
    
    [ Upstream commit 309422d280748c74f57f471559980268ac27732a ]
    
    This structure is embedded in multiple other structures that are packed,
    which conflicts with it being aligned.
    
    drivers/media/usb/as102/as10x_cmd.h:379:30: warning: field reg_addr within 'struct as10x_dump_memory::(unnamed at drivers/media/usb/as102/as10x_cmd.h:373:2)' is less aligned than 'struct as10x_register_addr' and is usually due to 'struct as10x_dump_memory::(unnamed at drivers/media/usb/as102/as10x_cmd.h:373:2)' being packed, which can lead to unaligned accesses [-Wunaligned-access]
    
    Mark it as being packed.
    
    Marking the inner struct as 'packed' does not change the layout, since the
    whole struct is already packed, it just silences the clang warning. See
    also this llvm discussion:
    
    https://github.com/llvm/llvm-project/issues/55520
    
    Signed-off-by: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/media/dvb-frontends/as102_fe_types.h b/drivers/media/dvb-frontends/as102_fe_types.h
index 80a5398b580fe..661d7574a6c73 100644
--- a/drivers/media/dvb-frontends/as102_fe_types.h
+++ b/drivers/media/dvb-frontends/as102_fe_types.h
@@ -183,6 +183,6 @@ struct as10x_register_addr {
 	uint32_t addr;
 	/* register mode access */
 	uint8_t mode;
-};
+} __packed;
 
 #endif




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux