]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 15 Nov 2020 15:19:01 +0000 (16:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 15 Nov 2020 15:19:01 +0000 (16:19 +0100)
added patches:
scsi-ufs-fix-missing-brace-warning-for-old-compilers.patch

queue-5.9/scsi-ufs-fix-missing-brace-warning-for-old-compilers.patch [new file with mode: 0644]
queue-5.9/series

diff --git a/queue-5.9/scsi-ufs-fix-missing-brace-warning-for-old-compilers.patch b/queue-5.9/scsi-ufs-fix-missing-brace-warning-for-old-compilers.patch
new file mode 100644 (file)
index 0000000..ad563f2
--- /dev/null
@@ -0,0 +1,53 @@
+From 6500251e590657066a227dce897a0392f302af24 Mon Sep 17 00:00:00 2001
+From: Pujin Shi <shipujin.t@gmail.com>
+Date: Fri, 2 Oct 2020 14:35:38 +0800
+Subject: scsi: ufs: Fix missing brace warning for old compilers
+
+From: Pujin Shi <shipujin.t@gmail.com>
+
+commit 6500251e590657066a227dce897a0392f302af24 upstream.
+
+For older versions of gcc, the array = {0}; will cause warnings:
+
+drivers/scsi/ufs/ufshcd-crypto.c: In function 'ufshcd_crypto_keyslot_program':
+drivers/scsi/ufs/ufshcd-crypto.c:62:8: warning: missing braces around initializer [-Wmissing-braces]
+  union ufs_crypto_cfg_entry cfg = { 0 };
+        ^
+drivers/scsi/ufs/ufshcd-crypto.c:62:8: warning: (near initialization for 'cfg.reg_val') [-Wmissing-braces]
+drivers/scsi/ufs/ufshcd-crypto.c: In function 'ufshcd_clear_keyslot':
+drivers/scsi/ufs/ufshcd-crypto.c:103:8: warning: missing braces around initializer [-Wmissing-braces]
+  union ufs_crypto_cfg_entry cfg = { 0 };
+        ^
+2 warnings generated
+
+Link: https://lore.kernel.org/r/20201002063538.1250-1-shipujin.t@gmail.com
+Fixes: 70297a8ac7a7 ("scsi: ufs: UFS crypto API")
+Reviewed-by: Eric Biggers <ebiggers@google.com>
+Signed-off-by: Pujin Shi <shipujin.t@gmail.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/scsi/ufs/ufshcd-crypto.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/scsi/ufs/ufshcd-crypto.c
++++ b/drivers/scsi/ufs/ufshcd-crypto.c
+@@ -59,7 +59,7 @@ static int ufshcd_crypto_keyslot_program
+       u8 data_unit_mask = key->crypto_cfg.data_unit_size / 512;
+       int i;
+       int cap_idx = -1;
+-      union ufs_crypto_cfg_entry cfg = { 0 };
++      union ufs_crypto_cfg_entry cfg = {};
+       int err;
+       BUILD_BUG_ON(UFS_CRYPTO_KEY_SIZE_INVALID != 0);
+@@ -100,7 +100,7 @@ static int ufshcd_clear_keyslot(struct u
+        * Clear the crypto cfg on the device. Clearing CFGE
+        * might not be sufficient, so just clear the entire cfg.
+        */
+-      union ufs_crypto_cfg_entry cfg = { 0 };
++      union ufs_crypto_cfg_entry cfg = {};
+       return ufshcd_program_key(hba, &cfg, slot);
+ }
index b7ddc51ae17817e312a452095461b4d3b31a6015..ea8242599a6cd2114d246df4dfcc756e6b8f0706 100644 (file)
@@ -72,3 +72,4 @@ usb-apple-mfi-fastcharge-fix-reference-leak-in-apple.patch
 tpm-efi-don-t-create-binary_bios_measurements-file-f.patch
 kvm-arm64-arm_smccc_arch_workaround_1-doesn-t-return-smccc_ret_not_required.patch
 ath9k_htc-use-appropriate-rs_datalen-type.patch
+scsi-ufs-fix-missing-brace-warning-for-old-compilers.patch