From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) (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 7C6573451BD for ; Fri, 20 Mar 2026 19:20:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.67 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774034444; cv=none; b=rdrnjOynDK3YlSHLCLgUsBfEl2AjRusrMNg3QExUXK92z1s3HAUoC7NVs4/DogNoi2pLoik9QxdiGt7tgJItD9QEZzgZe+OITA+R7UZkFaX6kRmUwJxHo+7y7mUav6aCC7zc1Bfm8Rd/ng+INdrApOhLyuaG+cflBQTeTvgS0Hc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774034444; c=relaxed/simple; bh=bcUaLaDT7X/+4e8Tm5i7a/qLN36+zeQCnz+0YlCBnJU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=C+BVxxJvTK/ydfObwk9u2b63nquSx0IPJScnfOqT+u6ykcm0e1x0h8okNC0kGBBmXXGLMlzr0PVWzfGBlLcMd0+XGLIq4d7vhOTMC9hGbarTIXFXMCvDeL71vyvRgTd9A7dSSSxYpwsxa5Tuh6r0vJRo5PtmOlKK8EzyPogeN9E= 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=SlDDb5Gb; arc=none smtp.client-ip=209.85.221.67 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="SlDDb5Gb" Received: by mail-wr1-f67.google.com with SMTP id ffacd0b85a97d-43b4d734678so2370355f8f.1 for ; Fri, 20 Mar 2026 12:20:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1774034442; x=1774639242; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YwyLx2/sa/LxIYpzrmb1C8yx6vkOmY822xVrJx5Km60=; b=SlDDb5GbC5silP4NRlws39TpMS8LCpKQWyo4MYtA3ltgLueGWg8JUoPKTW0PwJz4/j 0WDb6AQ10plAdK3hm9OooOtclV+cDcrMPdW3H+xOlJc8iO3cFfXGE2YH2Pd7FBLA3qBT rF+c9a7+Q2GkQEMPOJsanzBRqUMklnVpFHvaXTIFsOyWGSecpasfSbG2bOCXbsMiqMoe 2+Nc3pNcGx2uRODUynGxWiElJZNO0EmmAuSmYxC8mcmDQANzlpSInb0bI/1fHwlXVoC4 8fmqX95EGDxun/84W84Jt47xPw6WnQ2QopEucRtcpOoJ3rfkNWbE+EF08cF6NOEEJyHB BhQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774034442; x=1774639242; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=YwyLx2/sa/LxIYpzrmb1C8yx6vkOmY822xVrJx5Km60=; b=mDvYOqqaD4eTIMgsGBhZXteFAfUBhL/L3n9u5ZIr+EFKkYdqWQDuLIaHc4NTbke/F7 S+oXxX0WB3BFPcaU7HSgm+fGPd0dq7q+NV5xJrFJOT/zS42d1UWOnyj84+jFHujicezu lo4w/YWC+aCmXCXqQrRGmOY0nWm/ldngj0nUIU2IiiIGeEs44PQXollFa0hIPfaZCWWl biZfCS1gFvu9C1DhAt3VY0fe4XyRmKyZc3hX45EJYhKsFS5CpjIorERfmdK1/OkV2bWg 5HFjPB8QnBtr/v4gBXa0Vc/VGRJi/jQXgR/fSuQFNxo566Ry5N0ZzpAqjiUIaX6pTLm9 Gp6A== X-Forwarded-Encrypted: i=1; AJvYcCX1D3qrNh+4pTOi/AfT+DMnEmbrHOjD+b9Hmun/+Do1B0eydlJrLdL4+qgaoSheA8QEFgEbJZAyF8t8JjI=@vger.kernel.org X-Gm-Message-State: AOJu0YwljmgpOidnOcemfigtQolmF91CK5UTL22enD47Rj+hbkz3+Qag lMdzFf1rF5kSt6eNk8uGief5vj/hyJ3flaRjFKmA5iUJQDKbIVe2Mshk X-Gm-Gg: ATEYQzzKiZTzXRRmakP3xbLF1h75ApGSPxvZOyFaDL7Xq4ZXs4mbSPOTah3w//YyOQg +TyCQdkoRoF9iPlkPZxlT0jQiCtvQro0A19tMEs6t3sxko9GE56ro+5sKa3K8ov4WbcpqLpxgak v4j/UAw28S+eMwys6ug5Id7kw/MvE4SnMX6NMS7Up/giRtONb+vYUWGJkYBUc4pS1EVRO1zEdqp bw+1gPk5AIHSUcBo3vwHulgGVC+zCrkg62oCRrE0JxFt1kO4xK7jdGfBPBs8iahBugqDfIlcFG5 qa8jrJvWFSh1Ib5s6ydeNTU6q+3MDWPXrS1sBmnKDwX1jEj1C56ClkVD3HMnL2OyiYnJrBsIawe mhWurSXUpTWHT1QAS+Eif2ckrm16mBv+BgyiTQHTNeKoBmgpNCOvO2PBT/Uh0iHATmYwCy+kjg6 EyyCRmYgGRYfTKbpMLZVS1ffLg X-Received: by 2002:a05:6000:4381:b0:439:fd13:5c4a with SMTP id ffacd0b85a97d-43b64234891mr7331505f8f.6.1774034441641; Fri, 20 Mar 2026 12:20:41 -0700 (PDT) Received: from bera-arch ([46.155.28.159]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b644bf1c5sm9070542f8f.14.2026.03.20.12.20.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Mar 2026 12:20:41 -0700 (PDT) From: =?UTF-8?q?Bera=20Y=C3=BCzl=C3=BC?= To: b9788213@gmail.com Cc: Yeking@red54.com, andriy.shevchenko@linux.intel.com, ethantidmore06@gmail.com, gregkh@linuxfoundation.org, hansg@kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, rayfraytech@gmail.com, straube.linux@gmail.com Subject: Re: [PATCH] staging: rtl8723bs: remove copy function Date: Fri, 20 Mar 2026 22:19:59 +0300 Message-ID: <20260320192015.30665-2-b9788213@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260320182437.13948-2-b9788213@gmail.com> References: <20260320182437.13948-2-b9788213@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=UTF-8 Content-Transfer-Encoding: 8bit On Fri, 20 Mar 2026 11:25:08 -0700, Bera Yüzlü wrote: > On Fri, 20 Mar 2026 08:27:22 +0000, Andy Shevchenko wrote: > > > void PHY_SetTxPowerLimit( ... ) > > > { > > > struct hal_com_data *pHalData = GET_HAL_DATA(Adapter); > > > - u8 regulation = 0, bandwidth = 0, rateSection = 0, channel; > > > - s8 powerLimit = 0, prevPowerLimit, channelIndex; > > > + u8 regulation = 0, bandwidth = 0, rateSection = 0, channel, powerLimit; > > > + s8 prevPowerLimit, channelIndex; > > > + int ret; > > > > > > - GetU1ByteIntegerFromStringInDecimal((s8 *)Channel, &channel); > > > - GetU1ByteIntegerFromStringInDecimal((s8 *)PowerLimit, &powerLimit); > > > + ret = kstrtou8((const char *)Channel, 10, &channel); > > > + if (ret) > > > + return; > > > + > > > + ret = kstrtou8((const char *)PowerLimit, 10, &powerLimit); > > > + if (ret) > > > + return; > > > > This will change behaviour on the invalid data. Before it was just partially > > converted here and continue, now it breaks an execution. The commit message > > does not explain if it's safe to do or not (i.o.w. if there is a guarantee > > that in current state the input will be always in the correct form). > > > Otherwise, you probably want to use one of simple_strtou*(). > > It only indirectly called from ODM_ReadAndConfig_MP_8723B_TXPWR_LMT() with constant values. > Maybe we can convert this strings to ints so we don't need to do it at runtime. > We can also remove the wrapper odm_ConfigBB_TXPWR_LMT_8723B(). This should be a seperate > patch, right? > > Thanks, > Bera Just noticed ODM_ReadAndConfig_MP_8723B_TXPWR_LMT() didn't called anywhere. I will remove: GetU1ByteIntegerFromStringInDecimal() PHY_SetTxPowerLimit() odm_ConfigBB_TXPWR_LMT_8723B() ODM_ReadAndConfig_MP_8723B_TXPWR_LMT() in v2. They are all unusued. Thanks, Bera.