From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (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 76E2E3A1686 for ; Tue, 23 Jun 2026 05:21:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782192080; cv=none; b=W0qduxZqzjVw8zwx4hvTL5YQVLMMtzNkzuJlapenROjXY4kjS9jI/L67yJSObi4Qc1bIvEbgPupZK2730W6gR+2rrnrQjvLY+kyoYNIzmlhn5YzNcuYHEpFy5EOmNQVgkdFx30owgOfhtFvheX6QshPtxwr06gGiHsI9BS90GiY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782192080; c=relaxed/simple; bh=ST1JHEQ7mFAx4gDIq208KWCavqyeViWHnZbIAGD/r4E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EHMzdoz8LdCS3SkgHx0gXx7Osz7Nx+UsElvdv5RrmKYlGVYb1wQ7qzN4Bem8wscPPFXcKTzM6rcm1RiP826grYJKS2v8n/xswKOR/BHlPpw/yZYMM9lb4fr7+Z/T2kXVTqfsrF/YZFqeISiueKlWWxpqskmBN5MdgE0rf8JgNXc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CE1hGEII; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CE1hGEII" Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-c0e124d2a21so238669366b.2 for ; Mon, 22 Jun 2026 22:21:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782192078; x=1782796878; 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=yClUGsY1ysuyzjoW+pFwgJOCs93oAn9+JbUKr7O/i6I=; b=CE1hGEIIF2xGh1aHkVm7rM3zIsUlOXjq+pvLa9tg6HbASFf2scp4wn9xGs0PS4yuSK 0/8C6Q7f1waeYHED9QrIVkK+JUN95Fqv7goMrr/YE4qy9ANmv3EwMSED09lIKO3lj8lw RdV7/UGk0uWPuBYZK7IXNkO3+2/VntIK7Z1Vn8DX9LDyXcNeAN+KUkJlnGrFL1wX84rX soNAR4JfAtl+b93qnnvrt4G26PhQGy6h5dOtk6rHH61hfTw3INGJydZiyFYP/6H1I+2m rEQF8G3zsmdH7oljKNfbM+Q7xA95ELjwIBvaeBf2w9y3GqBf3Y5z0FYObS5Zhf3gnu/A mY8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782192078; x=1782796878; 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=yClUGsY1ysuyzjoW+pFwgJOCs93oAn9+JbUKr7O/i6I=; b=TgVH4pg6DH14juzd+ck1L2hIsGxyBDkoFmg2oXN+skURm3eFGOjEhPSncYRqz7T/hn KGOyLnBe8iKsA3t9gLgZoftAzd1+HbBL0I/D3KseLb7+l3JE/sc8vbCL4YAcbZbiU58n 3izti2eqm4otXEM2Zs8A2lEJbWP50eZh0f1c4vTKam8vRoiWFvPAV4JstlsUOLCYhWAM LwbLCa7FWOWIwj/5n4eBwv3vM7RKiJdJJT8v4nZzguhyLFPI5D/02N25+Xw4i1kIOZn3 +gUIMr2uOPYEOhyolg5YunisiN+bpzW9A8bM5QMVFYFd5N8eWUDVCHYUBSry9Z5zAuor ME1w== X-Forwarded-Encrypted: i=1; AFNElJ94rXU5OQORLrRDCw5pEG2Owxgdke6DX3jR+7rfEE9pY8TQ72fM/tIB6aq1QiHj+9efd9KETA9OOkvPEWg=@vger.kernel.org X-Gm-Message-State: AOJu0YzWuapyY+C+zAv3iPmSknYEzUCKZ9F4/HdMzHPR+WFwE+Z6elZ9 5VqJbcnP1xJpJ+ym2JCeEcvsZgvKPl3YOrzs/9nzDNIfSv9c/h9iv4cq X-Gm-Gg: AfdE7cnffV1p5UZh/RDbaWDq5CQwCpI7cQTwGBrz3c/5dCs+GePR1rTfPXb9CFaBY5S E1XN8JyJ/E7up8I75zqrezqSG87Vu32jMN1Vo4VvJY9gMR4k2zwnM6OMDvxJun0gKwuVSry014n lHrcvFgrq4V6Xqs2SPdzez09nNYNUcK1Cb6zVGf+2e1cBS5yDQXXCdEWgDbrEvxijwD6Sin3UJ6 /PCh+peR2wcF4ayieXIHWp4zt+lv+mlQGQbOK3kVFTQBWM59HSPp91hue3k0llh6xDcK82tQpVM Bo5WFX4BSphlFqFMV0yy/6xwi+Drx+1vKZYtjv2AMCLEnf0X/j4pICJNfed22yWX1KlKueQd7PL sullfaBvsmWWQ7H4NJxNm5IrtVYgRTAZ/yjCnR1ODMQA8mtOKs9QsaWZp7KyRcYW/AymRF0ZfNJ EzQX2rY1/P X-Received: by 2002:a17:907:1c04:b0:c0f:cc39:48c1 with SMTP id a640c23a62f3a-c0fcc394a26mr256035266b.14.1782192077615; Mon, 22 Jun 2026 22:21:17 -0700 (PDT) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6977be63fc0sm4336894a12.27.2026.06.22.22.21.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jun 2026 22:21:16 -0700 (PDT) Date: Tue, 23 Jun 2026 08:21:12 +0300 From: Dan Carpenter To: Serhat Kumral Cc: linux-staging@lists.linux.dev, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, lgs201920130244@gmail.com, Dan Carpenter Subject: Re: [PATCH v2] staging: rtl8723bs: simplify rtw_spt_band_alloc Message-ID: References: <20260622160947.7970-1-serhatkumral1@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: <20260622160947.7970-1-serhatkumral1@gmail.com> On Mon, Jun 22, 2026 at 07:09:47PM +0300, Serhat Kumral wrote: > The function only supports NL80211_BAND_2GHZ and falls through to > exit for any other band. Replace the n_channels and n_bitrates local > variables with the compile-time constants RTW_2G_CHANNELS_NUM and > RTW_G_RATES_NUM directly. > > Use simple addition in kzalloc() instead of chained size_add() calls, > since the sizes are derived from compile-time constants and cannot > overflow. Replace the intermediate alloc_sz variable accordingly. > > Remove the redundant second band check before the init calls, as > the early exit at the top of the function guarantees that only the > 2GHz case can reach that point. > > No functional change intended. > > Suggested-by: Dan Carpenter > > Signed-off-by: Serhat Kumral > --- Thanks! Reviewed-by: Dan Carpenter regards, dan carpenter