From kvalo at codeaurora.org Tue Jun 15 06:41:54 2021 From: kvalo at codeaurora.org (Kalle Valo) Date: Tue, 15 Jun 2021 13:41:54 +0000 (UTC) Subject: [PATCH] libertas: use DEVICE_ATTR_RW macro In-Reply-To: <20210523040339.2724-1-yuehaibing@huawei.com> References: <20210523040339.2724-1-yuehaibing@huawei.com> Message-ID: <20210615134154.C1D6FC4323A@smtp.codeaurora.org> YueHaibing wrote: > Use DEVICE_ATTR_RW helper instead of plain DEVICE_ATTR, > which makes the code a bit shorter and easier to read. > > Signed-off-by: YueHaibing Patch applied to wireless-drivers-next.git, thanks. 8667ab49a6e0 libertas: use DEVICE_ATTR_RW macro -- https://patchwork.kernel.org/project/linux-wireless/patch/20210523040339.2724-1-yuehaibing at huawei.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches From dingsenjie at 163.com Fri Jun 25 05:11:08 2021 From: dingsenjie at 163.com (dingsenjie at 163.com) Date: Fri, 25 Jun 2021 20:11:08 +0800 Subject: [PATCH] wireless: marvell/libertas: Remove unnecessary label of lbs_ethtool_get_eeprom Message-ID: <20210625121108.162868-1-dingsenjie@163.com> From: dingsenjie The label is only used once, so we delete it and use the return statement instead of the goto statement. Signed-off-by: dingsenjie --- drivers/net/wireless/marvell/libertas/ethtool.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/marvell/libertas/ethtool.c b/drivers/net/wireless/marvell/libertas/ethtool.c index 1bb8746..d8e4f29 100644 --- a/drivers/net/wireless/marvell/libertas/ethtool.c +++ b/drivers/net/wireless/marvell/libertas/ethtool.c @@ -43,10 +43,8 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev, int ret; if (eeprom->offset + eeprom->len > LBS_EEPROM_LEN || - eeprom->len > LBS_EEPROM_READ_LEN) { - ret = -EINVAL; - goto out; - } + eeprom->len > LBS_EEPROM_READ_LEN) + return -EINVAL; cmd.hdr.size = cpu_to_le16(sizeof(struct cmd_ds_802_11_eeprom_access) - LBS_EEPROM_READ_LEN + eeprom->len); @@ -57,8 +55,7 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev, if (!ret) memcpy(bytes, cmd.value, eeprom->len); -out: - return ret; + return ret; } static void lbs_ethtool_get_wol(struct net_device *dev, -- 1.9.1