From patchwork Thu Feb 1 07:01:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cong Liu X-Patchwork-Id: 195185 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:106:209c:c626 with SMTP id mn5csp264118dyc; Wed, 31 Jan 2024 23:14:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IElrWdI0kgOxE0/WD0z/tryOUIRaRo/nyj+hmC/nvwrqzQ534JMSR/jlPYwkOzMTfj9j9NI X-Received: by 2002:a05:6a00:4f89:b0:6df:ebee:11f1 with SMTP id ld9-20020a056a004f8900b006dfebee11f1mr446812pfb.29.1706771650989; Wed, 31 Jan 2024 23:14:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706771650; cv=pass; d=google.com; s=arc-20160816; b=XKcdz8VxgiXEoCZ+7Tax8GVvzSM4OFti5N9Fi83RqY7TFlsqadTvAT7+qEh9bK8iVS BkKIHskMOBDn7Sc0k2zfBD4D6rzqvpweUXyjltO89iiRgUEf6CGCBKO/FG7RtWAPDrvR +s1jat2K1+MhxeVYyzx/cRDIiwlWX0JVVHz4sBaVuXcEneOV4TZ/2H7Rq7VdESz4XJff xvjXYNPDKLnO7UgDN11FhHinWOPGqyndivwDOoo0unqAp9UmneJBw/Rh9ghWhcSP2EAC mYThM0bDVLGqB4cnWNZaS5/yfrqKVDXJBCfF7nfpgqgH0wOFYS3RbmoJJZN/9TveV41v bYBA== 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=jYd+HMPIKLKWZvFXXBNd4i2oTqcjyoUoEoJeeYMgSng=; b=iLof+3gFU7DBhsedaClkk7QuZkvojj024Bbk9rZBzA9vCrMfVWStPkt97CVM9brFiu fWhT3l93kpLuC/LM3jZNq42klhLQnwvZaEVL6JuQcnXeChbsCu81uIVeweegLjdClT2p Uo4UuEcR+hkxKVcqA9DhBDKldZ96Lknu5K/FvY4XiMMxNQgKZaIpKnUNdD08BHY6K2cQ 3dW034YSZ5SpM7NUSmIhhsjVvsYYHE3rWHdeiii7Kv4Wd3+VJTMi8XtsOQuvuVxsEKpw Fn5nD5NNbyA6+WAtay/oe6E8VXAZyIjTtU2V2Ex5w3rxkqxzo5JBueiooQOwET4RNv49 elkQ==; 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-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47722-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCVbM2T9y1kh8HsaTVLYjQNHFCetldprgbcNpNj1Dz8DIlW1OuSOKh0NEYdwvzwx6Nb7ep5YrM/KFBp94FIcq2KJi47zOQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id lo14-20020a056a003d0e00b006dbbe733262si11589008pfb.72.2024.01.31.23.14.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 23:14:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47722-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-47722-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47722-ouuuleilei=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 ADE15284823 for ; Thu, 1 Feb 2024 07:12:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DAA541586F5; Thu, 1 Feb 2024 07:12:23 +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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789679790302321580 X-GMAIL-MSGID: 1789679790302321580 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++;