From patchwork Fri Nov 1 06:07:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiapeng Chong X-Patchwork-Id: 841059 Received: from out30-112.freemail.mail.aliyun.com (out30-112.freemail.mail.aliyun.com [115.124.30.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 399F8149E17; Fri, 1 Nov 2024 06:07:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.112 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730441266; cv=none; b=Q9YSVdXlDYyakNL9MWY+xu7A1L+NufDdPP8YVSg8RfL0hpB6pRYOHxeL80fXCyi8ZoawY+CFQ28nrLyZ4b3RudnYTclLv1KmlVn1x6yhvxrCkShMW/n1FtBJinYkYzEhBqXrxaMHmm8tAh0GRLbNqGvDCqyy8Xj9jHLZSZUhRrE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730441266; c=relaxed/simple; bh=plt8G8LT3kR+/zrVwvToRdiIxtkQeIiQmCv7qcxEmVE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Uqv+lPrBVlgzdim/IO3/Rd2GOTrZ22Ah+ZP3orKo36g+atTvRqhV7RUpuIzVQMAiRwQm404/iKl5ET4P+o6768njFkiFrPG5mCBymDqGF54k1bxGJBQ4Bb+eO0MMOX1S3BRqsI+EudF6sXWlaSZsjajuPSGv+fJ14+AGEkpKXhg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=IYAtHctA; arc=none smtp.client-ip=115.124.30.112 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="IYAtHctA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1730441258; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=iO8REokc+MjYhT6aysq5M3qSaRIAZ0Ra+oLiHl1d95w=; b=IYAtHctAKUUvEoBq2KJ5lfMo6ZHqU9RZk16HjVfQ3/ywNnJa2dUerouRTLDFRqSZ4Z7quneYGLPMrpCHQKbBrMhd96vRHf29sk6O63iyP0kaFzOQLNAunci63D8718Cyi1f9+47mbn1uq30E4Ru6S6r9WjFxpzTVh6k//WewwZY= Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0WIN95IS_1730441247 cluster:ay36) by smtp.aliyun-inc.com; Fri, 01 Nov 2024 14:07:38 +0800 From: Jiapeng Chong To: stas.yakovlev@gmail.com Cc: kvalo@kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH v3 -next] wifi: ipw2x00: fix bad alignments Date: Fri, 1 Nov 2024 14:07:25 +0800 Message-Id: <20241101060725.54640-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.32.0.3.g01195cf9f Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This patch fixes incorrect code alignment. ./drivers/net/wireless/intel/ipw2x00/libipw_rx.c:871:2-3: code aligned with following code on line 882. ./drivers/net/wireless/intel/ipw2x00/libipw_rx.c:886:2-3: code aligned with following code on line 900. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11381 Signed-off-by: Jiapeng Chong --- Changes in v3: -Combine two if statements into one. drivers/net/wireless/intel/ipw2x00/libipw_rx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/intel/ipw2x00/libipw_rx.c b/drivers/net/wireless/intel/ipw2x00/libipw_rx.c index 7e41cb7bbfe0..dc4e91f58bb4 100644 --- a/drivers/net/wireless/intel/ipw2x00/libipw_rx.c +++ b/drivers/net/wireless/intel/ipw2x00/libipw_rx.c @@ -867,8 +867,8 @@ void libipw_rx_any(struct libipw_device *ieee, switch (ieee->iw_mode) { case IW_MODE_ADHOC: /* our BSS and not from/to DS */ - if (ether_addr_equal(hdr->addr3, ieee->bssid)) - if ((fc & (IEEE80211_FCTL_TODS+IEEE80211_FCTL_FROMDS)) == 0) { + if (ether_addr_equal(hdr->addr3, ieee->bssid) && + ((fc & (IEEE80211_FCTL_TODS + IEEE80211_FCTL_FROMDS)) == 0)) { /* promisc: get all */ if (ieee->dev->flags & IFF_PROMISC) is_packet_for_us = 1; @@ -882,8 +882,8 @@ void libipw_rx_any(struct libipw_device *ieee, break; case IW_MODE_INFRA: /* our BSS (== from our AP) and from DS */ - if (ether_addr_equal(hdr->addr2, ieee->bssid)) - if ((fc & (IEEE80211_FCTL_TODS+IEEE80211_FCTL_FROMDS)) == IEEE80211_FCTL_FROMDS) { + if (ether_addr_equal(hdr->addr2, ieee->bssid) && + ((fc & (IEEE80211_FCTL_TODS + IEEE80211_FCTL_FROMDS)) == IEEE80211_FCTL_FROMDS)) { /* promisc: get all */ if (ieee->dev->flags & IFF_PROMISC) is_packet_for_us = 1;