From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 72B22425CE3 for ; Wed, 4 Feb 2026 16:20:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770222059; cv=none; b=QX33r56iTrX2t7CjOXomONA4ZanB5+FSIeyLfYda6vXT+cBZCry8KA/Lrqyf+NAxH8cjJOZd5kUMXCBimignvV1EItrUfmFtp7wahA/BFt9TggDQo9LVFWeU3+YCI1Dx94ny1GfADwqjybcSpL1qbROR9ZqiwAwcSoKmdseJSwc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770222059; c=relaxed/simple; bh=u8sWi80W3AO9Hv7XEduOJE2qL2MOoLFLl1vWxLJhO2Y=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=IhX45z65gZ222RkZu6DpALB1mqVd60HFHF6Mh4sEy3OFAvxB5h6Bq0sL6tXC3mn7tqMWcvlSgrJZYb9NZwIedKFjFkTkB29Jc8W/jMTe7qX54lbqjEHiDByUGNYojIfZ723rqrRGB2ZZ1zRsZNblVrXMnBgpnskR7iNynJ57/pU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=ASKi093Y; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Ow/7/ALG; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="ASKi093Y"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Ow/7/ALG" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 614CIOMW1032387 for ; Wed, 4 Feb 2026 16:20:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= HOlOfyr9z+7LwrrbiWx8+S1ohIiREdLe+EgAPSCZNIk=; b=ASKi093YdU6ntubn UgBzRH847To08Ef0klB6UGl+vJUggziUDnjc66nxCT/apDUcOUWfcusBeO3jy96w 5X0KM17CwTR5IY846+co0bvPcrZi6+GuCd6/YxpzpiS8Fd80bU8uBxgLPzH8mdaF wl9OXoh6i1+LHEvSxuugdo0B2hiPfqs+yx1ZpfSZSjwynMUhfAzTVIRxduIkU2bI izN2gXIP/JtHJtbfxezRMQacpA4HTBWHxcCOKKfK+Y+O163kRA0QVP8x9pX6uw06 iJG+o+trWui/EY45JK4TXriOkNTsdGEyTW4pb3flE4np2BloL1rd8I1qcbseNSJQ gATVSA== Received: from mail-dy1-f200.google.com (mail-dy1-f200.google.com [74.125.82.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c3ne7v087-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 04 Feb 2026 16:20:58 +0000 (GMT) Received: by mail-dy1-f200.google.com with SMTP id 5a478bee46e88-2b72b6fc371so16930199eec.0 for ; Wed, 04 Feb 2026 08:20:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1770222058; x=1770826858; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=HOlOfyr9z+7LwrrbiWx8+S1ohIiREdLe+EgAPSCZNIk=; b=Ow/7/ALGG0KREa9YMtxpQhxzYHkOooucA3XuwebvAqAVrOr8YjnxyY7vEJ2gguZlHq 8nWYN9hfm7F/dyfsJuaEH1gY0SI8d+vTwMWPy1Dzvx6g0Kmg+xYeqCq4dVCHKAIh/0Ue rja67cFRadgj4sk/2oTOvhFEmCaDLknCu9UzhVnSpZKwV8KEDkfT4OCujNvvMYnx5YRD VtAYYmktVdOL5Um3hDdxOwEIR34h8LYmZtfcHA8ovvu3QGsv2RBbBYQOQFf5bKeZQPl1 9Oy4bcPdFny3TdRHlhuGNt8ix5988w8UEAVrDdDp+icIiIvMlI1lowDye8VYlSehLgRL M2aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770222058; x=1770826858; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HOlOfyr9z+7LwrrbiWx8+S1ohIiREdLe+EgAPSCZNIk=; b=RrzXy2w8a6EdfDJMHEhWgMzgNjDyd49xGiwhp8EnpncSJ1fDxN1+REOVhyH2/6DBH0 jH7/nxEqkSkKnmSdycJSSnFgS9IOguVGBTPp/lY3B6vkwr4qQoW2ctqwBUkZK3CJ6ulU 3Oddc6YBkMge54wNbTlRaCb+W68u1maX/u3snPhktOI1B8927pT9YkscD6DVONOqyX/S fIW310zcPiMJViB0hu8FpoMvkPmq+P8IMHhMua7bJODAELyi+Kmh4KtFqOUyHDfPsDZi 8rWWJycqS5OUDtbwqNyvSgQXAoqwRjL6RnYaQGuhITLItOvapLyD90TnAMlf/cjwqyjd V0fA== X-Forwarded-Encrypted: i=1; AJvYcCXlQZmi9WGAK4Mf4L9G1m+n3D1oSqm3pJ0jnE8t7/U9AhIfrK8w7z59IDgAEpbCvb/u1p6VKM1H5giz9i0=@vger.kernel.org X-Gm-Message-State: AOJu0YxzoX+SDSH2f7ekCRbpRHS2pkHioKcq3DaKy0ZZCJHO+vTqHsAL OYLGlPPH06R/t96mDfttq4Hp60fZY1gW3BedZuPii70X6dRUluArOGp1ZUNZli/Dyzj9qWig48n KWG/XRzXHcd6FfVzysrkOvPB12NPt/3+CgOueC1VBA7YB0Fo+yKihzXfGv+lw3V8grKU= X-Gm-Gg: AZuq6aLXavip8zYf+QqzIex/vBPwDqXXirtvOoQvOv444eW3GMrFCUMtChSXt8XLHMn pODtwd+cl1yxqov3C3seqkokneICk+1h0qNNvbwLZFM8nqynY1mp5WjEvDqdLGLWlrquxT5XOrw qec6/6SvSuRKierXvfco0R1RLGtBc0qfOMkX+SC16PPHHZL/2MyLb4sTOh6r/GhJjV9eeP4HmO0 1cjosTG1LXRKffjnXVDaDEFZNhbxwa4v8Ssddes0rsD5PbXeaIfhS6gxk2ZxdkXJiT9r3vpa0SX 177gaY1Fm9MlTDENHcocHgDuVwWDx+6D/cXCBqM/+5Z361h9TaYj655507NKOWWaYesz8CIcJ+K Nsj1fEtIWUpbX59OaskcNewv7vDwo+Dbt7DNfG1qFs7GuuqqKeCE/F+nAoS4RfpXuLfHiBw== X-Received: by 2002:a05:7300:dc86:b0:2b7:fa47:3b37 with SMTP id 5a478bee46e88-2b832738e71mr1414607eec.0.1770222057940; Wed, 04 Feb 2026 08:20:57 -0800 (PST) X-Received: by 2002:a05:7300:dc86:b0:2b7:fa47:3b37 with SMTP id 5a478bee46e88-2b832738e71mr1414601eec.0.1770222057362; Wed, 04 Feb 2026 08:20:57 -0800 (PST) Received: from [10.227.110.203] (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b832fb363esm1734756eec.26.2026.02.04.08.20.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Feb 2026 08:20:56 -0800 (PST) Message-ID: <9f3b472d-a8d1-4c51-9eed-6ef0ec5b28a3@oss.qualcomm.com> Date: Wed, 4 Feb 2026 08:20:55 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] wifi: nl80211: drop impossible negative band check To: sun jian , Johannes Berg Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260204081821.730673-1-sun.jian.kdev@gmail.com> <074b66ab3d63e6640ecd6962c074702225fba19e.camel@sipsolutions.net> From: Jeff Johnson Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: DfRMtswtOhB6JFuSiyHHTkmeX2JMDbVz X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjA0MDEyNCBTYWx0ZWRfX6SAGBBGoMVgR 5G/PrprDMwjfpdIeRqtXsdb88cNmPOLkKTv0+yOSAFYGxVae4A56gEpHVbuJvQ+4cEVC/7bEqiT CyUGkl4tcS+TJ10XnoMH0yIqI4vMqzMjWzmayHg65Inn2irfkSNG7otUKiMYJBBCT86oxTNq8nP rDWckDJQ0dUdk4NegPo4aKe+oWZZxT8hjV3vc7el7LrY9waAwCG9RTQNEhOfChP1rb8f3tV935a SgswgtYYNxvvENboAWKIQjjMHQSYsD2ptO4c2GDeiIZI0RjM/T1hRj84zdxkfvsdlS/22QfWEIp f8wq6H/Yza1IUqw+J0lWRSs3Gy5q+O0k0lgeqNPsIsI7s242uu5h/wBlLE+k1Evx3Lx4+Zo1tXF EuQN43IGGV+WHwFWQsHZrQQFPa1h5Qnh5ErZjOYTBb9qlQXMtRIUVCprGoCMXaK4BPEmW9KdPGK XljzrFSR6wyURfwiDiw== X-Authority-Analysis: v=2.4 cv=TZmbdBQh c=1 sm=1 tr=0 ts=698371ea cx=c_pps a=PfFC4Oe2JQzmKTvty2cRDw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=stkexhm8AAAA:8 a=TyCgi0gAG9BFsVhkn9sA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=6Ab_bkdmUrQuMsNx7PHu:22 a=pIW3pCRaVxJDc-hWtpF8:22 X-Proofpoint-GUID: DfRMtswtOhB6JFuSiyHHTkmeX2JMDbVz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-02-04_05,2026-02-04_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 clxscore=1015 spamscore=0 adultscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602040124 On 2/4/2026 3:33 AM, sun jian wrote: > On Wed, Feb 4, 2026 at 7:29 PM Johannes Berg wrote: >> >> On Wed, 2026-02-04 at 19:21 +0800, sun jian wrote: >>>> >>>> applies _only_ to signed short, not to signed char? >>> Fair point, thanks. I'll drop this patch. >> >> I've thought the better way to address that warning would be to simply >> use 'int' instead of the enum there, but I forgot where the warning even >> appears. I don't think it's generally with gcc/clang, is it? >> > > Right, I only saw it from sparse, not from gcc/clang. > > It was reported for net/wireless/nl80211.c at the checks around lines > ~5762 and ~10539 in my tree (both are "band < 0 || band >= > NUM_NL80211_BANDS" with band coming from nla_type()). For future reference, if you are fixing a warning, then your commit text should include that information. That way someone else who has that warning can search the archives for that warning and then find your fix. /jeff