From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.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 9EF823E6395 for ; Fri, 20 Mar 2026 18:25:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.67 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774031112; cv=none; b=XcZY0HcLH5DT7HgQa2GjDaZe5T9v/itPZDUyoDtubofctDYiz5Q+JL1MvbolmQw5yq8vAaEYWkxn0FB8njVHrKioteH7HXQEtdkL7ZofaS51wxYFe8fx2HiWcsi4Q616jAanqoPRsusWTCC1XI/eHDapXjccX6anBmITtnZQfO4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774031112; c=relaxed/simple; bh=HLV1+7c0cHhSGM6g/pJ/pb8a/UE+c2C9klvWkcA/owc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gaVZ/A3NHbf3u7W4TFH2uagO/8JxepXltunAgUJ5+8ZKnmCdU8WU5/lXtDHiqaLV2ocMkTE2uyNm5JbVOkBcgZs1ZZ6ovXjQg4RDeCEnGkjj0Va0EYWCMc+pfvQVl26ihWU0nS5T2ZTFVtD295DG9+tjhrKf2L8vVcDGsDYc7YM= 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=KczaddaC; arc=none smtp.client-ip=209.85.128.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="KczaddaC" Received: by mail-wm1-f67.google.com with SMTP id 5b1f17b1804b1-48541edecf9so23252255e9.1 for ; Fri, 20 Mar 2026 11:25:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1774031109; x=1774635909; 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=A7fimwUkTYqTrPnEDqmdbKzIAKs/1aN798frFHDBu8c=; b=KczaddaCojBCJmpsH9gLxEyDp4REyJeGkLqACnRjLUbVtA8rZMC7qXL8pcQMpNDKSw 8NQYqtumNf1/Zr80hVY3+BMek1QBc1OQRLz4nIv1FC254nLwI9jLKxPPtiLtZVENvsAD A45pz722Yh7QTLkEwxVWiel6OiXQ5U2iQ8UtigyNdggxtOrMuee1UrA2lDXxp+VX9u6K x0O2VbQ/7hNA65mlItWSYN+5eIGo74Q8WW9zdBeFid9FoQ+5x/t/pY0A7PZSz1ubNIq3 Au4JgbicgKhGWbxAmRFRQJTnUjm2GeUs/mrQGoDzJzLkZBOgNXTYCKH+TvLK2TdQ+3NJ +cxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774031109; x=1774635909; 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=A7fimwUkTYqTrPnEDqmdbKzIAKs/1aN798frFHDBu8c=; b=URCnB207ZiisYo1Lc6rxHKWyhs21IyOcxb3f74lkXKeTIZFqmQpAirgP1JFBkZCLGO Fl1DOm040u8W7RM4c/lunAHxKtUNOeCxqU60ZmUvDQILlCI5EFIPODI3EQ2RJCMZaeQu ruy8bak8p463/BdgWeFs/6jMWBM40mAfq6oY0Wv2t9ZGrpFoXAlkOexkWVOSCYN2mywr KDuVClRfb0BVuX2MEF4AXDNh2Jb3W3C2RNiJqGPpmYK/dela4D1KDAAj/IhzeyEn9xmA IW8zb7eOzTCJJSwQSEaPHIyRCNpwBsNPRU80CKeIdjvY6TaMYzX9RL3yc7BPaS3YrZlD jA+A== X-Forwarded-Encrypted: i=1; AJvYcCUjHYo0P0JMrYhcs/DRuy/mWFhX9lZ18hDnNxuPtbEdomX6B0XCU1aEB75aD5BqXax2dHI5YD4QN0VpwLU=@vger.kernel.org X-Gm-Message-State: AOJu0YwthqEuCC+hDmh2B5zS/W1lu/Nh5YasCbsvoBOLsqnjJ1qQNcHI WtWZ1pgeZtnntoAPq2orVaerog7E/YeSin8ZvAIsPFnr2yEUBqFlKxiq X-Gm-Gg: ATEYQzwnKdLJBq8J/18w+xrwnoPNdVktJQWHngY0guUTlA+PnjMIrdyqZZnckXBf6lM F0q64Goh2Nw5k2vnJZ8qAylAxxGzGiY+guVHMNrDkxcov6VzMVrdYXmnBtIXy0upBHkR2QnsvXA 0sNUJkuhwTox5u9eb+OlH0SGpouH+ygiYQs4YDG9QMuQ7oHBU3racvHJ27R4lzUkiAiBESpQ+Zc DKyDDie8pug0XtdtgVzibeAw58h+B4PmKNhg4LDYT7iRXrsJxh6eNxcFPzeed0wHx6Pf+tfcSwv X9uy/8qGBXY1afebVU+k4sK4r4ul5OPw148uRFSu563eOLcyKQmqi7P/bEMJSEHGYbwuBqsHRe4 zmIPpia/d5uyLvos/uiAPl7sIb1exAVYB/OTswWhClVJXAskrS30MybI1RehmayQctS3rjxgGOA 4ishN4Vp20nW29LZf5VxSgDP4s X-Received: by 2002:a05:600c:8508:b0:485:3b00:f92e with SMTP id 5b1f17b1804b1-486fedab7dbmr58265045e9.2.1774031108748; Fri, 20 Mar 2026 11:25:08 -0700 (PDT) Received: from bera-arch ([46.155.28.159]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48700524864sm24702115e9.5.2026.03.20.11.25.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Mar 2026 11:25:08 -0700 (PDT) From: =?UTF-8?q?Bera=20Y=C3=BCzl=C3=BC?= To: andriy.shevchenko@linux.intel.com Cc: Yeking@red54.com, b9788213@gmail.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 21:24:38 +0300 Message-ID: <20260320182437.13948-2-b9788213@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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