Skip to content

Instantly share code, notes, and snippets.

View GustavoARSilva's full-sized avatar

Gustavo A. R. Silva GustavoARSilva

View GitHub Profile
@GustavoARSilva
GustavoARSilva / -Wfamnae-fs-smb2pdu
Created April 11, 2024 15:22
-Wfamnae-fs-smb2pdu warnings
fs/smb/client/../common/smb2pdu.h:1225:31: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
fs/smb/client/../common/smb2pdu.h:1233:31: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
fs/smb/client/../common/smb2pdu.h:1246:31: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
fs/smb/client/../common/smb2pdu.h:1253:31: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
fs/smb/client/../common/smb2pdu.h:1289:31: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
fs/smb/client/../common/smb2pdu.h:1295:31: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
fs/smb/cli
@GustavoARSilva
GustavoARSilva / -Wfamnae-misc-mei
Created March 25, 2024 19:46
-Wflex-array-member-not-at-end warnings in drivers/misc/mei/
drivers/misc/mei/hw.h:280:28: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/misc/mei/hw.h:341:28: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/misc/mei/hw.h:361:28: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/misc/mei/hw.h:280:28: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/misc/mei/hw.h:341:28: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/misc/mei/hw.h:361:28: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/misc/mei/hw.h:280:28: warning: structure containing a flexible array member is n
@GustavoARSilva
GustavoARSilva / -Wfamnae-wifi-mwl8k
Created March 25, 2024 03:07
-Wflex-array-member-not-at-end warnings in drivers/net/wireless/marvell/mwl8k.c
drivers/net/wireless/marvell/mwl8k.c:2353:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/marvell/mwl8k.c:2502:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/marvell/mwl8k.c:2596:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/marvell/mwl8k.c:2673:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/marvell/mwl8k.c:2732:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/marvell/mwl8k.c:2774:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-
@GustavoARSilva
GustavoARSilva / -Wfamnae-wifi-ti
Created March 25, 2024 01:53
-Wflex-array-member-not-at-end warnings in drivers/net/wireless/ti/ due to unused flexible-array members.
drivers/net/wireless/ti/wl1251/acx.h:17:34: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/ti/wl1251/cmd.h:139:34: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/ti/wl1251/cmd.h:217:34: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/ti/wl1251/cmd.h:235:34: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/ti/wl1251/cmd.h:272:34: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/ti/wl1251/cmd.h:281:34: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
index ef722f04f88a..b0e428cbeef7 100644
--- a/block/scsi_ioctl.c
+++ b/block/scsi_ioctl.c
@@ -653,7 +653,7 @@ struct compat_cdrom_generic_command {
unsigned char data_direction;
compat_int_t quiet;
compat_int_t timeout;
- compat_caddr_t reserved[1];
+ compat_caddr_t reserved[];
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index 52375f3e430a..6fbab3459811 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -322,7 +322,7 @@ struct ndis_80211_capability {
__le32 version;
__le32 num_pmkids;
__le32 num_auth_encr_pair;
- struct ndis_80211_auth_encr_pair auth_encr_pair[0];
+ struct ndis_80211_auth_encr_pair auth_encr_pair[];
diff --git a/net/ceph/auth_none.h b/net/ceph/auth_none.h
index 4158f064302e..3c68c0ee3dab 100644
--- a/net/ceph/auth_none.h
+++ b/net/ceph/auth_none.h
@@ -16,7 +16,7 @@ struct ceph_none_authorizer {
struct ceph_authorizer base;
char buf[128];
int buf_len;
- char reply_buf[0];
+ char reply_buf[];
@GustavoARSilva
GustavoARSilva / fam-conversion.diff
Created April 29, 2020 21:50
flexible-array member conversion
diff --git a/include/linux/tpm_eventlog.h b/include/linux/tpm_eventlog.h
index c253461b1c4e..4f8c90c93c29 100644
--- a/include/linux/tpm_eventlog.h
+++ b/include/linux/tpm_eventlog.h
@@ -97,7 +97,7 @@ struct tcg_pcr_event {
u32 event_type;
u8 digest[20];
u32 event_size;
- u8 event[0];
+ u8 event[];
diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
index b52410d..68933d2 100644
--- a/drivers/media/platform/qcom/venus/helpers.c
+++ b/drivers/media/platform/qcom/venus/helpers.c
@@ -292,7 +292,7 @@ static void return_buf_error(struct venus_inst *inst,
if (vbuf->vb2_buf.type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
v4l2_m2m_src_buf_remove_by_buf(m2m_ctx, vbuf);
else
- v4l2_m2m_src_buf_remove_by_buf(m2m_ctx, vbuf);
+ v4l2_m2m_dst_buf_remove_by_buf(m2m_ctx, vbuf);
@GustavoARSilva
GustavoARSilva / FIXME.patch
Created August 30, 2017 13:26
Duplicated code for different branches (FIXME comment)
diff...
--- drivers/net/wireless/broadcom/b43/xmit.c
+++ /tmp/cocci-output-4443-305535-xmit.c
@@ -185,9 +185,7 @@ static u16 b43_generate_tx_phy_ctl1(stru
u16 bw;
if (phy->type == B43_PHYTYPE_LP)
- bw = B43_TXH_PHY1_BW_20;
else /* FIXME */
- bw = B43_TXH_PHY1_BW_20;