Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e47f406f authored by Pujin Shi's avatar Pujin Shi Committed by Lee Jones
Browse files

UPSTREAM: scsi: ufs: Fix missing brace warning for old compilers

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

Bug: 254441685
Link: https://lore.kernel.org/r/20201002063538.1250-1-shipujin.t@gmail.com


Fixes: 70297a8ac7a7 ("scsi: ufs: UFS crypto API")
Reviewed-by: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarPujin Shi <shipujin.t@gmail.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 6500251e590657066a227dce897a0392f302af24)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: I2890ae75d51d2403665441cb9e01a8b46a1e0e32
parent 88f2865d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment