Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp44214rdb; Wed, 31 Jan 2024 23:14:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IFxGWCxjNTpw+ayCdnlWqEqpA+PmQ4iUBnCvvC2USO7mTvNqikLEJ6GczxdkjuUS8y5lgfH X-Received: by 2002:a17:903:40cb:b0:1d8:d224:974 with SMTP id t11-20020a17090340cb00b001d8d2240974mr4832978pld.45.1706771644910; Wed, 31 Jan 2024 23:14:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706771644; cv=pass; d=google.com; s=arc-20160816; b=zdkS/cwBxZ6hdmyudnDfDtBJe1sDG9Og90VRTeLWwi7CbD6du1surxY3e50M9thNnC 54dVD9by2K0yQi1KlzGzyrxn0GYa6U6+AjaqIYE6gombUgSaCzcytDJkH9LAMumyBRs/ nL2P5CtIbCQuj7n7ZJVlS1QiKN/pcFOjK3pGpWIwdsj+X/zCgguuUNMqNrNMbtFXxpT9 FBN8pj7iPx376D4J3bA8GlBuOCJT7qTkGxC2ajL79yMHcg5okLQs1kSxpYFqQcorQu3+ flrO67r3O62IuPMKuItEWoJB1rtqdTcO55ltlhANnx7WL/CtoND5PndMw3e3MrqQ94DT OnQQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=KJvHG25n80/iI9vJmPmR96TWaG/5ale1xq9Q+K2JY2w=; fh=znIgmEiPwFphjKYRD5nD+lLtLIOIN0S6aWAc7pdPRIU=; b=ZggkKwNwOfmnudQl80d8C0V/LMIfmaGBTe9RUQuTLgv4SvkaGp0E/CMVC0ywN/qZzA BXH2E9BJg3qUcEpQrV8n7ICriKr5Qaijjbv9jAIEI2XX00mHf5kD0r/00xQvGhRIlJHv WIcYuvjH74rAjvRiFiqfy+W3XMJNtT1VR0DkAxX9+rYCP9Yl9A5Z1nADkA9voydPM/P5 l9msOVzWd4KLHs72wP+cS3+pHBq3ILJLw2hzXmXVGbRvx44ePOiEtp10V+VddiTN/mdS BtUQtmmIMTBZPb7EyC08oshn1wXs4gqyksvbZ+cUW/PN6FBi56CDziRxFdqHUBEBhYur etkA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-47722-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47722-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCUS6WjMoc5rmqM5F3AqBQD/MrsLvsIwf4VX1v2kCtuDjvwAbFZtAF/Mv30+E58aRz5qSuDwJ7LvodN2BZ1kwJiiWeVRLC7j4Ff61Wce6w== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id jb18-20020a170903259200b001d94e827ffdsi839340plb.45.2024.01.31.23.14.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 23:14:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47722-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-47722-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47722-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 82C5F2847A8 for ; Thu, 1 Feb 2024 07:12:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C84901586D5; Thu, 1 Feb 2024 07:12:22 +0000 (UTC) Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) (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 69788157E94; Thu, 1 Feb 2024 07:12:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=124.126.103.232 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706771542; cv=none; b=Gr2gvXJLYVVmaQphbi5HhOMiZ6dVWz8ThvXMuUab8K8ogc+OFu0ct31ylSZuDEWcvlODODwAkLId7Xz9S1XI4BnhvCpxRhEf3HvKTXf05maeyL8eoqEjH9fyA8L1a/biPWf9JxJbSvNsRb0tfcf1G3iMx1tUxS/CkAQixlUlX0o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706771542; c=relaxed/simple; bh=9pSdTqppayXVg8e6uEt07WBrfPZEDwNrE4b0Y5LSgg8=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=WvDoHgWvKjaw4ayz0TGqG7nMqT9e1w79fQzICL+E6+9MWli8QcoPXfMkKSQYJfBi91TM9gEYba3pyG+SgOChbV1+BfYg04gpxsr4D6RFb7UivFfHVMEwlB0funamwhi++6rid8Uo5g28FSdyz1x3ZfoG3W6KyTB/RstQ2e4ZRbA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn; spf=pass smtp.mailfrom=kylinos.cn; arc=none smtp.client-ip=124.126.103.232 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kylinos.cn X-UUID: 65cdf20534ff4e049a204efcd879dd7c-20240201 X-CID-O-RULE: Release_Ham X-CID-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:1eff9a06-e204-4097-8ba7-f29e89d81adb,IP:15, URL:0,TC:0,Content:-5,EDM:0,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACT ION:release,TS:-5 X-CID-INFO: VERSION:1.1.35,REQID:1eff9a06-e204-4097-8ba7-f29e89d81adb,IP:15,UR L:0,TC:0,Content:-5,EDM:0,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:-5 X-CID-META: VersionHash:5d391d7,CLOUDID:4972e68e-e2c0-40b0-a8fe-7c7e47299109,B ulkID:240201150131SZXINURA,BulkQuantity:0,Recheck:0,SF:19|44|66|24|17|102, TC:nil,Content:0,EDM:-3,IP:-2,URL:1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 ,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_FAS,TF_CID_SPAM_FSD,TF_CID_SPAM_FSI, TF_CID_SPAM_ULS X-UUID: 65cdf20534ff4e049a204efcd879dd7c-20240201 X-User: liucong2@kylinos.cn Received: from localhost.localdomain [(116.128.244.171)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 1121363701; Thu, 01 Feb 2024 15:01:29 +0800 From: Cong Liu To: Helge Deller Cc: Cong Liu , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] fbdev/sh_mobile_lcdcfb: Replace deprecated simple_strtol with kstrtol Date: Thu, 1 Feb 2024 15:01:27 +0800 Message-Id: <20240201070127.3290465-1-liucong2@kylinos.cn> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This patch replaces the use of the deprecated simple_strtol [1] function in the sh_mobile_lcdcfb.c file with the recommended kstrtol function. This change improves error handling and boundary checks. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#simple-strtol-simple-strtoll-simple-strtoul-simple-strtoull Signed-off-by: Cong Liu --- drivers/video/fbdev/sh_mobile_lcdcfb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c index eb2297b37504..5fc7d74b273e 100644 --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c @@ -1278,11 +1278,11 @@ overlay_position_store(struct device *dev, struct device_attribute *attr, int pos_x; int pos_y; - pos_x = simple_strtol(buf, &endp, 10); + pos_x = kstrtol(buf, &endp, 10); if (*endp != ',') return -EINVAL; - pos_y = simple_strtol(endp + 1, &endp, 10); + pos_y = kstrtol(endp + 1, &endp, 10); if (isspace(*endp)) endp++; -- 2.34.1