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

Commit 7bf0242a authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman
Browse files

staging: wilc1000: remove unnecessary use of parentheses



Fix "Unnecessary parentheses around" issue found by checkpatch.pl
script.Remove the unnecessary parentheses to follow linux coding style.

Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Reviewed-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f93a2b8b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -201,7 +201,7 @@ static inline u16 get_cap_info(u8 *data)

	st = get_sub_type(data);

	if ((st == BEACON) || (st == PROBE_RSP))
	if (st == BEACON || st == PROBE_RSP)
		index += TIME_STAMP_LEN + BEACON_INTERVAL_LEN;

	cap_info  = data[index];
+17 −17
Original line number Diff line number Diff line
@@ -394,7 +394,7 @@ static void handle_set_operation_mode(struct wilc_vif *vif,
	ret = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
				   wilc_get_vif_idx(vif));

	if ((hif_op_mode->mode) == IDLE_MODE)
	if (hif_op_mode->mode == IDLE_MODE)
		complete(&hif_driver_comp);

	if (ret)
@@ -760,8 +760,8 @@ static s32 handle_scan(struct wilc_vif *vif, struct scan_attr *scan_info)
	hif_drv->usr_scan_req.scan_result = scan_info->result;
	hif_drv->usr_scan_req.arg = scan_info->arg;

	if ((hif_drv->hif_state >= HOST_IF_SCANNING) &&
	    (hif_drv->hif_state < HOST_IF_CONNECTED)) {
	if (hif_drv->hif_state >= HOST_IF_SCANNING &&
	    hif_drv->hif_state < HOST_IF_CONNECTED) {
		netdev_err(vif->ndev, "Already scan\n");
		result = -EBUSY;
		goto ERRORHANDLER;
@@ -1025,7 +1025,7 @@ static s32 Handle_Connect(struct wilc_vif *vif,
	pu8CurrByte += MAX_SSID_LEN;
	*(pu8CurrByte++) = INFRASTRUCTURE;

	if ((pstrHostIFconnectAttr->ch >= 1) && (pstrHostIFconnectAttr->ch <= 14)) {
	if (pstrHostIFconnectAttr->ch >= 1 && pstrHostIFconnectAttr->ch <= 14) {
		*(pu8CurrByte++) = pstrHostIFconnectAttr->ch;
	} else {
		netdev_err(vif->ndev, "Channel out of range\n");
@@ -1258,8 +1258,8 @@ static s32 Handle_RcvdNtwrkInfo(struct wilc_vif *vif,

	if (hif_drv->usr_scan_req.scan_result) {
		wilc_parse_network_info(pstrRcvdNetworkInfo->buffer, &pstrNetworkInfo);
		if ((!pstrNetworkInfo) ||
		    (!hif_drv->usr_scan_req.scan_result)) {
		if (!pstrNetworkInfo ||
		    !hif_drv->usr_scan_req.scan_result) {
			netdev_err(vif->ndev, "driver is null\n");
			result = -EINVAL;
			goto done;
@@ -1340,8 +1340,8 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
		return -ENODEV;
	}

	if ((hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP) ||
	    (hif_drv->hif_state == HOST_IF_CONNECTED) ||
	if (hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP ||
	    hif_drv->hif_state == HOST_IF_CONNECTED ||
	    hif_drv->usr_scan_req.scan_result) {
		if (!pstrRcvdGnrlAsyncInfo->buffer ||
		    !hif_drv->usr_conn_req.conn_result) {
@@ -1400,8 +1400,8 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
				}
			}

			if ((u8MacStatus == MAC_CONNECTED) &&
			    (strConnectInfo.status != SUCCESSFUL_STATUSCODE))	{
			if (u8MacStatus == MAC_CONNECTED &&
			    strConnectInfo.status != SUCCESSFUL_STATUSCODE)	{
				netdev_err(vif->ndev, "Received MAC status is MAC_CONNECTED while the received status code in Asoc Resp is not SUCCESSFUL_STATUSCODE\n");
				eth_zero_addr(wilc_connected_ssid);
			} else if (u8MacStatus == MAC_DISCONNECTED)    {
@@ -1412,8 +1412,8 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
			if (hif_drv->usr_conn_req.bssid) {
				memcpy(strConnectInfo.bssid, hif_drv->usr_conn_req.bssid, 6);

				if ((u8MacStatus == MAC_CONNECTED) &&
				    (strConnectInfo.status == SUCCESSFUL_STATUSCODE))	{
				if (u8MacStatus == MAC_CONNECTED &&
				    strConnectInfo.status == SUCCESSFUL_STATUSCODE)	{
					memcpy(hif_drv->assoc_bssid,
					       hif_drv->usr_conn_req.bssid, ETH_ALEN);
				}
@@ -1434,8 +1434,8 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
							  NULL,
							  hif_drv->usr_conn_req.arg);

			if ((u8MacStatus == MAC_CONNECTED) &&
			    (strConnectInfo.status == SUCCESSFUL_STATUSCODE))	{
			if (u8MacStatus == MAC_CONNECTED &&
			    strConnectInfo.status == SUCCESSFUL_STATUSCODE)	{
				wilc_set_power_mgmt(vif, 0, 0);

				hif_drv->hif_state = HOST_IF_CONNECTED;
@@ -1864,8 +1864,8 @@ void wilc_resolve_disconnect_aberration(struct wilc_vif *vif)
{
	if (!vif->hif_drv)
		return;
	if ((vif->hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP) ||
	    (vif->hif_drv->hif_state == HOST_IF_CONNECTING))
	if (vif->hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP ||
	    vif->hif_drv->hif_state == HOST_IF_CONNECTING)
		wilc_disconnect(vif, 1);
}

@@ -2414,7 +2414,7 @@ static void Handle_SetMulticastFilter(struct wilc_vif *vif,

	wid.id = (u16)WID_SETUP_MULTICAST_FILTER;
	wid.type = WID_BIN;
	wid.size = sizeof(struct set_multicast) + ((strHostIfSetMulti->cnt) * ETH_ALEN);
	wid.size = sizeof(struct set_multicast) + (strHostIfSetMulti->cnt * ETH_ALEN);
	wid.val = kmalloc(wid.size, GFP_KERNEL);
	if (!wid.val)
		goto ERRORHANDLER;
+4 −4
Original line number Diff line number Diff line
@@ -911,13 +911,13 @@ static void wilc_set_multicast_list(struct net_device *dev)
	if (dev->flags & IFF_PROMISC)
		return;

	if ((dev->flags & IFF_ALLMULTI) ||
	    (dev->mc.count) > WILC_MULTICAST_TABLE_SIZE) {
	if (dev->flags & IFF_ALLMULTI ||
	    dev->mc.count > WILC_MULTICAST_TABLE_SIZE) {
		wilc_setup_multicast_filter(vif, false, 0);
		return;
	}

	if ((dev->mc.count) == 0) {
	if (dev->mc.count == 0) {
		wilc_setup_multicast_filter(vif, true, 0);
		return;
	}
@@ -1030,7 +1030,7 @@ static int wilc_mac_close(struct net_device *ndev)
	if (!hif_drv)
		return 0;

	if ((wl->open_ifcs) > 0)
	if (wl->open_ifcs > 0)
		wl->open_ifcs--;
	else
		return 0;
+2 −2
Original line number Diff line number Diff line
@@ -375,7 +375,7 @@ static int sdio_write_reg(struct wilc *wilc, u32 addr, u32 data)

	data = cpu_to_le32(data);

	if ((addr >= 0xf0) && (addr <= 0xff)) {
	if (addr >= 0xf0 && addr <= 0xff) {
		struct sdio_cmd52 cmd;

		cmd.read_write = 1;
@@ -515,7 +515,7 @@ static int sdio_read_reg(struct wilc *wilc, u32 addr, u32 *data)
	struct sdio_func *func = dev_to_sdio_func(wilc->dev);
	int ret;

	if ((addr >= 0xf0) && (addr <= 0xff)) {
	if (addr >= 0xf0 && addr <= 0xff) {
		struct sdio_cmd52 cmd;

		cmd.read_write = 0;
+10 −10
Original line number Diff line number Diff line
@@ -390,11 +390,11 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 adr, u8 *b, u32 sz,
#define NUM_DATA_BYTES (4)
#define NUM_CRC_BYTES (2)
#define NUM_DUMMY_BYTES (3)
	if ((cmd == CMD_RESET) ||
	    (cmd == CMD_TERMINATE) ||
	    (cmd == CMD_REPEAT)) {
	if (cmd == CMD_RESET ||
	    cmd == CMD_TERMINATE ||
	    cmd == CMD_REPEAT) {
		len2 = len + (NUM_SKIP_BYTES + NUM_RSP_BYTES + NUM_DUMMY_BYTES);
	} else if ((cmd == CMD_INTERNAL_READ) || (cmd == CMD_SINGLE_READ)) {
	} else if (cmd == CMD_INTERNAL_READ || cmd == CMD_SINGLE_READ) {
		if (!g_spi.crc_off) {
			len2 = len + (NUM_RSP_BYTES + NUM_DATA_HDR_BYTES + NUM_DATA_BYTES
				      + NUM_CRC_BYTES + NUM_DUMMY_BYTES);
@@ -425,9 +425,9 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 adr, u8 *b, u32 sz,
	/**
	 * Command/Control response
	 **/
	if ((cmd == CMD_RESET) ||
	    (cmd == CMD_TERMINATE) ||
	    (cmd == CMD_REPEAT)) {
	if (cmd == CMD_RESET ||
	    cmd == CMD_TERMINATE ||
	    cmd == CMD_REPEAT) {
		rix++;         /* skip 1 byte */
	}

@@ -453,8 +453,8 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 adr, u8 *b, u32 sz,
		return N_FAIL;
	}

	if ((cmd == CMD_INTERNAL_READ) || (cmd == CMD_SINGLE_READ) ||
	    (cmd == CMD_DMA_READ) || (cmd == CMD_DMA_EXT_READ)) {
	if (cmd == CMD_INTERNAL_READ || cmd == CMD_SINGLE_READ ||
	    cmd == CMD_DMA_READ || cmd == CMD_DMA_EXT_READ) {
		int retry;
		/* u16 crc1, crc2; */
		u8 crc[2];
@@ -480,7 +480,7 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 adr, u8 *b, u32 sz,
			return N_RESET;
		}

		if ((cmd == CMD_INTERNAL_READ) || (cmd == CMD_SINGLE_READ)) {
		if (cmd == CMD_INTERNAL_READ || cmd == CMD_SINGLE_READ) {
			/**
			 * Read bytes
			 **/
Loading