From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0DBB3450F2 for ; Mon, 9 Feb 2026 07:09:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770620953; cv=none; b=edUKbI76CqLosHRXg9+9CDJ/gqbDKEoEjFBLUjXjM/BCXrtG8uJB5dR4alOwc97EEx8P9BS8iW+Va4cRgpDpbG7qKQZo6emKTGA6UkkD+cxrxSsu6scOYQSZJo/g6aboEh8J/sJDVkaFl2oFOpfZimslD2AXxQLLZhwIaONXFw4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770620953; c=relaxed/simple; bh=JQ6KieO2BytO97um39ZUy6qMsNYgjWeYJKy3C65SQqU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qXt7pdRzvjvA00Bmi+GwghMA47x1IeL4TBkkFxCzd859aYDlmhPBLxopoGG8gVeG5dNLIjNQl4ObRodguNYGXfnKSLxnu7WEr09Y878cFMy8pU6tp4RmJFCOGN5nl7VeUPPQiptXADhuAcyWlfikt9UOUiENHK2ETC+aUy6HzRM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=GXFatpqg; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="GXFatpqg" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-480706554beso28460765e9.1 for ; Sun, 08 Feb 2026 23:09:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770620951; x=1771225751; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=CHcb9GpFerkiwQUmjbisuUz1eFP8rTweshtbwygwIyI=; b=GXFatpqgmfE0nCuuYzReJOM8bo/o2DeWuu9v2VV5WqC1x9YR1evYth35V4QLRj1tXC IdMllLlP0FdXlr0Wycru5Hadeou1NcZvrB28yMwof5GWLP97ITvfrBIkL+iIRqtHn+qb zXI/KbicPKgpN7OfusP6Yg3PuOG21hpJExfAt3I7aBLMQ8PO5HqiESIUeTkYZfmJQjAK rV+peT4Hi1gQIZ3xT3I/g8en1/PMisiQ7b/gEjpp/VQoKeTTRWBMmJrTEzxgL8tPZZoU qfbDZ5AtkmVGjPW0/97Zoc17wmk3wgfXZyPO8f6jiewswqrtdrT8MULITxxnwvR2gTBS QlZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770620951; x=1771225751; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CHcb9GpFerkiwQUmjbisuUz1eFP8rTweshtbwygwIyI=; b=ACq1l1cS/qod1CuaT9HCH1mKEFccKn3X1Qp+5pBfKHkc0WLGK1iDgNqU6wyme17WwT 5jv0cFPoQNCqGmgDUMcgKUHJmnkNhnGi3cve83gO68wm4QwBGRM56qxXTC/AH7EEsPn/ stx4dTqq4c6oqSo176f3jSgpGKRFF+d/jxeBDyStao54Rur9AvDPOv3v96S5hpYQ3Oy7 AXeQwX6Y0+ZIfLLg+tH0DFxzWO7quf01SyYbOdjVCMVVp6Oc7Aj2wD/LfEL3dXxzw1bP aa1qdP7GHSjmy0BM5YMHh+gF7b0zbIzvAr/z8wUx08vuUDiWgXPv8sor8sOG2fizyp7I Gfbg== X-Forwarded-Encrypted: i=1; AJvYcCVufEJFIRkecs6AQCgpDqrt66mLwWZUmldOI8Lyoo56rgQRSwIKFvmqBPFtMasqR6ENlqWiknJ2vJnxXXg=@vger.kernel.org X-Gm-Message-State: AOJu0Yzp0JqfHFgiwMCZ4eMu5opdwuNKM0GI+ba6i5+syl2xezZnV5we 1TH77OE79i9duc4c+81jCjBn515QhzEIfblWz+jYrgKvT9n5ABPjylgAsdn17SR+OQY= X-Gm-Gg: AZuq6aIELZyOvuAM/bT6/75TiFm8mK6DwP9zMmEh5WhNCKCxYweoL8wzXFN6nPttRe9 6CVXi2QQ9DywV2MAIf+0u2RUDW19zEtcTk3VfzpkT+ASfM+JP1K1V4OPYZDhIzlpe5tQdrfWlIE brkgdNKN+kebxSJEXxALfigON0alB+1Dunfoo4jjEhYkMSQtff0+GGljW2A83MX/P4IdCUAfrs3 L01K2WVVAWW16Eo16t24Jupy7T4i/L/3/W72slHSq8PTLziu3wKx31KUhJlnn5YfqQETUMycZFE G7vhnFN/bIf2OxI8en45eX7shPruvTsVbIhi4qBdZdBbE8fWG7qE3SYPENcXKlue5DSrSIxlhaO 2hIMMqi+4pPTXyrLTIoykQWm3eBVZX+H/t4ij0YlR/hkKt8tE+sV+5sB7kbM7HY3cyy1yEOO1ZN sDbdvKQzYJ0ddGFk+S X-Received: by 2002:a05:600c:8b0f:b0:47e:e5c5:f3a3 with SMTP id 5b1f17b1804b1-4832021613fmr160869105e9.24.1770620951242; Sun, 08 Feb 2026 23:09:11 -0800 (PST) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48317d299bfsm286866755e9.2.2026.02.08.23.09.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Feb 2026 23:09:10 -0800 (PST) Date: Mon, 9 Feb 2026 08:37:04 +0300 From: Dan Carpenter To: William Hansen-Baird Cc: gregkh@linuxfoundation.org, david.laight.linux@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4] staging: rtl8723bs: replace ternary min comparison with min() Message-ID: References: <20260207220136.67923-1-william.hansen.baird@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260207220136.67923-1-william.hansen.baird@gmail.com> On Sat, Feb 07, 2026 at 05:01:36PM -0500, William Hansen-Baird wrote: > Change type of local variable wpa_ie_len from int to u8. > wpa_ie_len gets its value either from elems->wpa_ie_len or > elems->rsn_ie_len which are both u8, and thus there's no reason > to cast them to int. > > This allows rewriting ternary min comparison using the min() function from > linux/minmax.h as now both sides are unsigned. > > Rewrite as well wpa_ie_len + 2 to wpa_ie_len + 2u, > to keep the expression unsigned and avoid overflows. > > Signed-off-by: William Hansen-Baird > --- LGTM. Reviewed-by: Dan Carpenter regards, dan carpenter