From patchwork Sat Jul 6 08:11:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Qasim Abdul Majeed X-Patchwork-Id: 13725713 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 CD5316AC0; Sat, 6 Jul 2024 08:11:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720253476; cv=none; b=X6NZkH3DlcclA8KLokVBIoC5htQqQu4TKh/sDmOMjQmubYuO+9KmcUmVS+fqvCB8L/OzFommuAFZxX/JOgPP0lk75SK5GNe7Udl+9/aiPB7NVRICA1VPpPpWIPiiyA248pxAKOHxjXOKZZCtIaKUCzVKYlh6jjR59jC3nbIWJPY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720253476; c=relaxed/simple; bh=rfZEouzOxsNRA4awpkHYUc2icZH/Imr5myeeWGkXRSs=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Tdn7HncwlZ8R5rit3+YaK0OyR0I1wgfDt2TK/RaZQsWiln8Ju9PWQmMYOuvY7JO+Lu1ox2HtGj01EZD5FGEUoxIsgCqZnaq+dqGzpIuAmdbJf2JnF/U36ul8dv5ZAwKAZ4qQL59kTs8i3mLNfYloodvysUJ7PUhDlaPq9RSkJm0= 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=aI8972uT; arc=none smtp.client-ip=209.85.221.41 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="aI8972uT" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-367a2c2e41aso991818f8f.2; Sat, 06 Jul 2024 01:11:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720253473; x=1720858273; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Jxdnk9LdT8owd0wJzaCgXhayUh+BFK4CbLfMVXWHNtg=; b=aI8972uTYNQvFili5Pgrd4z5mEX5lsr1y2HEQool5bsMrFYY5XH9Oaxc8BsXnlGT2V kX0YWhVx/xLu4Pe24KHjO1FT7Iu0A1de4/fXPNeFX7JiTeiSMeDVD/53ME30aUTzorbr eJmNR3xVwNWkEFTgaY+cAqeAKc7UWmSGhId2AntOXUxKv6kfKpyTnyFGUJ5iW0f6s0XT Rv076r69F6O6v+qyMcjAx/uYYMmAC7ZiE9/Fzdb1WQD3izzkvlQ1veNIUcnNCSmLE17K VbR1IecXSUabEsDN/L0lhBqLoaH161H9ZfCriX2HAzHnTHtG9q0tX+My4rp99d1BKkSK uobw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720253473; x=1720858273; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Jxdnk9LdT8owd0wJzaCgXhayUh+BFK4CbLfMVXWHNtg=; b=CIdLdg3fRz+X44EHrD09mHVsE8E0sw6oTnFn3PexeyCmraoeeghw3PBHbQ2/4uzJe9 AiYCjlWVZmGAqXbvCllR7JzicIMYqjxEyJgJhESemtiraopsfVsDezmYeMnu3dK5NoQ4 wAHiz6htNn0XlGlYpqeQ5mULkxHMkdDfvenMnSgEq4DaypZiraFUJdnsV7RkOP3RELh7 yZS9AKNNrp3EAWYLZExij6dCNU48TEcNRG0tuGWE4H6wbPmOx0pXIRvfLi22eg1UbUj9 tP66r5TbXU5uoo/mQPEOu/msQ9eB1PMkGFHeV7TNWTarbbS8AGV9Fo1yJx90R3EWuY0M XilQ== X-Forwarded-Encrypted: i=1; AJvYcCUsT4H9My3XrnQeZmBrzh2FNkcmPQWUUavLwd4H+igmwnKN0NpfmRfdN+DZQPfcGI11cLilgx6hjiViOJH5bM7kzN6236Z8Ev4qOA6aBU7bIj5pOzJJXl0aq3Xa7gwimBvjBBPdke+Rog== X-Gm-Message-State: AOJu0YwWqEl2xAFfmsUiYCcvUZXzgsTQb+Euh200VQMUHLCPOaUZBbEr DHrByGyiJj3wx7droxfdB5/60zpIok+eM8TZX+cxcySun7DNnnoRv8jwT+AD X-Google-Smtp-Source: AGHT+IFy6A3hKW7ZOYBZj6yCN1WQxglhxu7RdXUwCCGKSa4XPbZVh4Namx902c/KY2bbHNyp63ukkw== X-Received: by 2002:adf:fd02:0:b0:366:eeda:c32d with SMTP id ffacd0b85a97d-3679dd353c3mr4798004f8f.31.1720253472975; Sat, 06 Jul 2024 01:11:12 -0700 (PDT) Received: from qamajeed.Home ([39.45.163.30]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3678e5c2b08sm10235931f8f.71.2024.07.06.01.11.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jul 2024 01:11:12 -0700 (PDT) From: Muhammad Qasim Abdul Majeed To: rafael@kernel.org, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Muhammad Qasim Abdul Majeed Subject: [PATCH 1/4] Updating a deprecated use of strcpy from acpi_pad.c file. Date: Sat, 6 Jul 2024 13:11:01 +0500 Message-Id: <20240706081104.14493-1-qasim.majeed20@gmail.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Replacing strcpy with strscpy. strcpy is a deprecated function. It should be removed from the kernel source. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Muhammad Qasim Abdul Majeed --- drivers/acpi/acpi_pad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c index bd1ad07f0290..e49f89bbeacf 100644 --- a/drivers/acpi/acpi_pad.c +++ b/drivers/acpi/acpi_pad.c @@ -417,8 +417,8 @@ static int acpi_pad_probe(struct platform_device *pdev) struct acpi_device *adev = ACPI_COMPANION(&pdev->dev); acpi_status status; - strcpy(acpi_device_name(adev), ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME); - strcpy(acpi_device_class(adev), ACPI_PROCESSOR_AGGREGATOR_CLASS); + strscpy(acpi_device_name(adev), ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME); + strscpy(acpi_device_class(adev), ACPI_PROCESSOR_AGGREGATOR_CLASS); status = acpi_install_notify_handler(adev->handle, ACPI_DEVICE_NOTIFY, acpi_pad_notify, adev); From patchwork Sat Jul 6 08:11:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Qasim Abdul Majeed X-Patchwork-Id: 13725714 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.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 6D71F482D3; Sat, 6 Jul 2024 08:11:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720253487; cv=none; b=GsIn1FO+KyJco2YfWaawFxqZji9VaFF7NVlZEeKhuvmfpJPQJi5wzapnTq4VFQxEFDHn1wwVXriBYwHl/xhib5yA0xQwWI0n2GZ3/hL0s91zwxbE8YLTYXUJYUuDhyZQI8z2oozsUU1gCZMs2pi82+emT8B7dgLqr3F+AKfy5n8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720253487; c=relaxed/simple; bh=FX1I3X73MwNh0D/6lAVpYMWgdP5ZgymmF8SGh4iQnuo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=feP3hlWrLYCdI74mOvCRBkRA1f/MmQ05vg1Ql+9iCHJeV49Z4XPKJ9zeDqxkt1a5zCI19GmZDyy5pWfkVD10YeU6EA9/21xcXIaCPWd74IvdMCGUb3GB/nk3e0pohvuJ1vMCBT7w5lwXpO+4kqM52h8rs+D/OPLFQGFD1Pz7k60= 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=W1Ej/un2; arc=none smtp.client-ip=209.85.221.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="W1Ej/un2" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-3679df4cb4cso1427247f8f.0; Sat, 06 Jul 2024 01:11:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720253483; x=1720858283; 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=KtqQxTg/RL66mUa+pBjnTwVV1hlAlFA3VQSPpIWWypE=; b=W1Ej/un2KLIASS0qekNkqXo9DQKlnf9m+Uu7udii4nFFMmM/vhCj8wYkrD7Dwl9x7Z AYYetjVVQV4VE86rgPvOSW4zyg7Iktluqy6bye7rm4tF6GrIIjdii2rKZq+dGGJcTSC9 p6q8S9k3aCsDGZQflEXmwmzbwQgLtWHOiBqp36youmb6he9tQwSncyCQRk5SQ8454ErF V9nKUpmvzHlCY8RBnHj5g3m1zrJrZXDBU6DVNBZEPRXv6bN7jaWNwEB3aIiAKrjaQydm bmA4017qaEK60X2TixeVYB+CAGUYlm553/ZZyOcpEaU+fjiPI1JQrYaCJFTShgGHh/WX epeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720253483; x=1720858283; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KtqQxTg/RL66mUa+pBjnTwVV1hlAlFA3VQSPpIWWypE=; b=Hay09EqQ+oo8+PHXLLdBGC1oAgcOHhb93+gLjZFYhYzW/91w0kdEBCZatHFTeZXMxE 1Tki3byzDsLC2G9OuHTVBBz5CJuG+GMkPIF8y3jnnWDmYfS8mXezimnO79s7SWjW+gx3 nmT6jdkNSuDk3N0qq5hRNcPlefY/ntNNKkp4NpeVYkSHSTss+VSM/jaBSzrpn8x+V01h JZ9JMnxp62O8hViNjDNi4szYDJdSIf1ykda95idcUY9WyAcJREjyuO5O2pWAlD+3dIim lCetalYhF8/4mpUI3rr70IwBj+OGpyZXA9CwTasIWkdK7+Dh2eMYOGADTrQEVJRM4bLb dOgw== X-Forwarded-Encrypted: i=1; AJvYcCVB0BgYtxUDLIuaHV2P693ooSfNmOuFP1K6vcxZAV5DTNtWSXdQXGRqxp1HCSS5FlauqP2nAkKg6XIkjJck8Bh98DYoO2qhAOjk/RcKS7T2Z9eSd8/iLDQOOFxYqwRNqKir1g9S0WDKng== X-Gm-Message-State: AOJu0YzbOYU/02C2ZbS3kv3H5XulqdUoiyjTG88s9llzaCVgQUGD6JHA PgK8TEG1BmnPdSEg7/zt73nKk1mSw7hh6fl7vHrr7f9FhU1YV2f2 X-Google-Smtp-Source: AGHT+IGtqL6OAbpkpWpg+wiXGtlXVHNZcZUGopU+eOAEqYkdVg9KXdSXtqxewHWSKbiSyyrmyNqzIQ== X-Received: by 2002:a5d:6a4c:0:b0:366:df3f:6f9c with SMTP id ffacd0b85a97d-3679f6d866emr6273240f8f.3.1720253482626; Sat, 06 Jul 2024 01:11:22 -0700 (PDT) Received: from qamajeed.Home ([39.45.163.30]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3678e5c2b08sm10235931f8f.71.2024.07.06.01.11.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jul 2024 01:11:22 -0700 (PDT) From: Muhammad Qasim Abdul Majeed To: rafael@kernel.org, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Muhammad Qasim Abdul Majeed Subject: [PATCH 2/4] Updating a deprecated use of strcpy in acpi_processor.c file. Date: Sat, 6 Jul 2024 13:11:02 +0500 Message-Id: <20240706081104.14493-2-qasim.majeed20@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240706081104.14493-1-qasim.majeed20@gmail.com> References: <20240706081104.14493-1-qasim.majeed20@gmail.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Replacing strcpy with strscpy. strcpy is a deprecated function. It should be removed from the kernel source. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Muhammad Qasim Abdul Majeed --- drivers/acpi/acpi_processor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index 7a0dd35d62c9..8a8826a2242d 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -394,8 +394,8 @@ static int acpi_processor_add(struct acpi_device *device, } pr->handle = device->handle; - strcpy(acpi_device_name(device), ACPI_PROCESSOR_DEVICE_NAME); - strcpy(acpi_device_class(device), ACPI_PROCESSOR_CLASS); + strscpy(acpi_device_name(device), ACPI_PROCESSOR_DEVICE_NAME); + strscpy(acpi_device_class(device), ACPI_PROCESSOR_CLASS); device->driver_data = pr; result = acpi_processor_get_info(device); From patchwork Sat Jul 6 08:11:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Qasim Abdul Majeed X-Patchwork-Id: 13725715 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 B605547781; Sat, 6 Jul 2024 08:11:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720253490; cv=none; b=XtExGoshBg/tLCmxe/9p75bcKvV/SoEmQUSNqFbYWwtji/T61fzqx4UWPN21ws4affUGWCnTW3Jtth7/C+/qmKlcXBFg/FukzgxOHjCYEUUQYV6UFUS+R+mbx3vfmQTAtl313OufXyjA2EioIg+EoxLsPsq404d/UTdyVsLL34Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720253490; c=relaxed/simple; bh=F4uqQFVbA9zLBmTHzvRWfP44WgnlCFjFtF4DjGBlRqI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mqz57E0ea6hhoZqJQdVUf75zCRKcIOWsB1mRC7Vr8njucMWzNqzvQ9teMGDTBgMgQ282CCdvw89U2tgOzOoQvsmmIAJM9f3m0ta5cyDtwSbhZYB/WmdByxD7/OnWhOWFMl9G1BCknxDfZz3NdhU0F9w7RSvK3hypyWRHB6XUffE= 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=YRVxZ8SO; arc=none smtp.client-ip=209.85.221.41 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="YRVxZ8SO" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-367a081d1cdso1265511f8f.1; Sat, 06 Jul 2024 01:11:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720253487; x=1720858287; 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=Y3fxhsBTrwbycBuKl2A9RrsrM0JOo+6fyQb8KEc5vcA=; b=YRVxZ8SO+eDqgyDw5xg+TainZnOxw9ZqCIg0qT3o4wFWxUBDZf2abUp5HBUs7Cq2fP V21yAGiw0h7uUwBVbpt+JSfDGs6k4xUpvgIwmF5RxE0N/T4gjzuyYlE5xcdy9CnnpFMl BPQK5T2jeenu/a412GfOC4LC5sjkuknmHlyEoIOs2o649WQhFp9IdgB290u20bouZbkn 9r2X5TEkHQuzHDLo1MMLtvLexIkkWxtbB37QWET5xM46dzc3BCVSfaedssOyIPpi3Dx0 pzZ+PBSvNUbwBW/lsGTucd8ikJ5FTY9wEizR/KM5iv4EPoLAyBLYjBytrX7DIEpp8jiQ IB1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720253487; x=1720858287; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y3fxhsBTrwbycBuKl2A9RrsrM0JOo+6fyQb8KEc5vcA=; b=CxftZK0IBriWNRN21SE7mIEVzdZTmBsRP3oQvj1Ky1flVlN2x1EVqT1R6LE3QeaIui h9J982wO+X8yFyz6DBVW+a5utoAQGQ4AVGK97yvW+dH9+5IUFXjJhNhEg3CwDbY6r3+W X08h9ilIM37sGf1W2idvSehH/wbzU8M5ePWESYggZX3IF7AFBEOamjmDdNGLdDzJr94o a5qprmvnozvXzYofVkuT4zMQ0CuWs7I+S3CCw/YDA30LBz8bE4V7dN+5r5YtLJUDPg/y VBDjrj/PD7xZtT1SYXYYcCznWnj11rsds7fKzjOGMGwUzaAecZ2Uz9UGVxUVi99oN6Cs vC7g== X-Forwarded-Encrypted: i=1; AJvYcCVfnTQL+njHXmouJ1SgBmzwX1vVIlDqH26natw653wg7jJT+08JH35hPcV4liCKXnaFhhwYtE7vi+3ygkf9CKIKmP9uk2Q3Wy1rs3em5z1Nb0uSRwtbLzaT4GkRKw84Y3cDL37J5hz8KQ== X-Gm-Message-State: AOJu0YxKNz3sETtMRxYUH6O/8V9YKN8+9HiT7BTKCllNa/t0I+JtPO84 wWMnh1j75UJyWs1JzXzhamkNgjIHj/Qf/6UiZBWdLhrefFKqooEu X-Google-Smtp-Source: AGHT+IGPBLGFlHwgc+1BoQ3mJVxMVgNvNrkMiJfuxzoNS5tvieo1k2ohto5NbOyIlZF2yqZgoLlQdA== X-Received: by 2002:a5d:408c:0:b0:360:7c13:761e with SMTP id ffacd0b85a97d-3679dd71a3dmr5000077f8f.65.1720253486927; Sat, 06 Jul 2024 01:11:26 -0700 (PDT) Received: from qamajeed.Home ([39.45.163.30]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3678e5c2b08sm10235931f8f.71.2024.07.06.01.11.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jul 2024 01:11:26 -0700 (PDT) From: Muhammad Qasim Abdul Majeed To: rafael@kernel.org, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Muhammad Qasim Abdul Majeed Subject: [PATCH 3/4] Updating a deprecated use of strcpy in battry.c file. Date: Sat, 6 Jul 2024 13:11:03 +0500 Message-Id: <20240706081104.14493-3-qasim.majeed20@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240706081104.14493-1-qasim.majeed20@gmail.com> References: <20240706081104.14493-1-qasim.majeed20@gmail.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Replacing strcpy with strscpy. strcpy is a deprecated function. It should be removed from the kernel source. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Muhammad Qasim Abdul Majeed --- drivers/acpi/battery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index b379401ff1c2..784f9234f1a4 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -1193,8 +1193,8 @@ static int acpi_battery_add(struct acpi_device *device) if (!battery) return -ENOMEM; battery->device = device; - strcpy(acpi_device_name(device), ACPI_BATTERY_DEVICE_NAME); - strcpy(acpi_device_class(device), ACPI_BATTERY_CLASS); + strscpy(acpi_device_name(device), ACPI_BATTERY_DEVICE_NAME); + strscpy(acpi_device_class(device), ACPI_BATTERY_CLASS); device->driver_data = battery; mutex_init(&battery->lock); mutex_init(&battery->sysfs_lock); From patchwork Sat Jul 6 08:11:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Qasim Abdul Majeed X-Patchwork-Id: 13725716 Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (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 D4C8D4D9E3; Sat, 6 Jul 2024 08:11:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720253495; cv=none; b=DVqIhpqHV1SJQ27FAAe7pEmMcG4Cx8R9MmNiWOql65mgZN7XtPVyM2Na0ebpzMSp/ePC10n6J4w9PUV+TnxOOIRZ5bRFac60gKKiqNr9tXeZrix4epZLVAdWTJQUwL957wD6o6X8yv2/S8CVPLBSE7mWyBNGKMjz0HkIbjgtD6c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720253495; c=relaxed/simple; bh=pKa+Okrp8HFvyoegiNG5O/Qu4HS3i0dN0VCzZBOFmjA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=j9hccSufxki9k2ETGRwpLgCBoU5etFNMSLQ0MqqoooMcxSeU1YR084i2wOI9N+b3ZUnTzx9g/scXqIkuhdxQkWE4UZGYf+O1tXCFJ4q7LPqdFgxQDjG3704gkI/Jt03UpxHholcTE4t2gYLpxGqvNDch7IIi+JYZzh77/p3n+hE= 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=IyxkTrk0; arc=none smtp.client-ip=209.85.208.170 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="IyxkTrk0" Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2ee90dc1dc1so20877501fa.3; Sat, 06 Jul 2024 01:11:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720253492; x=1720858292; 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=PsjQFQCvqoiusg5g0bghoFxdMmEPMQr/Y48nTfxH8Fs=; b=IyxkTrk0L4MTGvIBvQ9sH6a1g9xn9YGkyT0Cn43UpFUjXjUA3AcB3Xi5zU+Lq3cKPd 2S0EY8WumOe5BClnGdGEaU81TePhC0hjf42z3oVZhSrGOzD5GSY79fpja+fJce4L+COv ZUS13n+Kfx2Fts83lAt/SUFcQZ2+N/JeH25fxWbUGN02ttzEhIOH46KCa1NuJEbYeJtP DVsspW1VmjA252MkL5Z6xARh/H2S61lLXyN3165oqadJ+JIs2njFdaJm3RpuR47zG92b lsXlS3IKjVwqk0O+Ml/aBKkcJCmx+dUwdcr6Nl7XeboKheMv3kxtuQvP2Nv8LQmaECss mXCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720253492; x=1720858292; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PsjQFQCvqoiusg5g0bghoFxdMmEPMQr/Y48nTfxH8Fs=; b=TvVqmLYB1nOnnd3CjheTdPcRICKMR3WjqDMaFADmB8ZxAJMn0Olf9p1WJ7qrW2tXvu n37nJ7jj1rZM8VbFm3QKxsa4q8A3Lc5rgKmv9qR308KOQo4pgBGNbuAs2H9lPaiFGcwm PBz5mYMtC2lB8A447ymBD3Nr6Rafpzl5YbtxjdKqhYIaQjF0v/pZLNY53fGFnv1gmUq8 YFeCmX/shhRisGm1q+KQeDVcoydho0O2mrUcQH3gtBO/SiMlJdE5u33CkbHFlj17kDLJ wM7N8yEgNdn0tEzrKgDYtkckwB6787Vtowfzkr3FFtpSTtPQXZxdnYDrqhnbzAmcCbD9 KPoA== X-Forwarded-Encrypted: i=1; AJvYcCVjBH0QIAr+PWR2vvAxTFEFAkF3o/EIPujodvYmQj1RFtFI1W5XCBMgRrmm2kmTyQLWQyK03oNod7Kj6yoUhQ975GS7z4b87ogiNtMN22q0zGu5gn/N/p7t733I4JxX4n4KByMBYvA63Q== X-Gm-Message-State: AOJu0YxoTKFrwIxt1uqF9hW1aHuSnWJWmZ9diJ49uDbrAbzzA01taUkl c+p4WXV8pLVEgu403oPXSvajx72zrqAHaqbVTk/9KgrsNLLgR7D7y4w95IHA X-Google-Smtp-Source: AGHT+IF/fAIXOMgJoLn+gsE/If7tDYT7q+fuwpkdYzhPW1+9vx+FlNTulT4Wh/2s5442+4geqhf43A== X-Received: by 2002:a05:651c:19a0:b0:2ee:7b93:5209 with SMTP id 38308e7fff4ca-2ee8ee14ee0mr53242151fa.45.1720253491610; Sat, 06 Jul 2024 01:11:31 -0700 (PDT) Received: from qamajeed.Home ([39.45.163.30]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3678e5c2b08sm10235931f8f.71.2024.07.06.01.11.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jul 2024 01:11:31 -0700 (PDT) From: Muhammad Qasim Abdul Majeed To: rafael@kernel.org, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Muhammad Qasim Abdul Majeed Subject: [PATCH 4/4] Updating a deprecated use of strcpy in button.c file. Date: Sat, 6 Jul 2024 13:11:04 +0500 Message-Id: <20240706081104.14493-4-qasim.majeed20@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240706081104.14493-1-qasim.majeed20@gmail.com> References: <20240706081104.14493-1-qasim.majeed20@gmail.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Replacing strcpy with strscpy. strcpy is a deprecated function. It should be removed from the kernel source. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Muhammad Qasim Abdul Majeed --- drivers/acpi/button.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index cc61020756be..fa5f079b30d1 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -547,20 +547,20 @@ static int acpi_button_add(struct acpi_device *device) !strcmp(hid, ACPI_BUTTON_HID_POWERF)) { button->type = ACPI_BUTTON_TYPE_POWER; handler = acpi_button_notify; - strcpy(name, ACPI_BUTTON_DEVICE_NAME_POWER); + strscpy(name, ACPI_BUTTON_DEVICE_NAME_POWER); sprintf(class, "%s/%s", ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_POWER); } else if (!strcmp(hid, ACPI_BUTTON_HID_SLEEP) || !strcmp(hid, ACPI_BUTTON_HID_SLEEPF)) { button->type = ACPI_BUTTON_TYPE_SLEEP; handler = acpi_button_notify; - strcpy(name, ACPI_BUTTON_DEVICE_NAME_SLEEP); + strscpy(name, ACPI_BUTTON_DEVICE_NAME_SLEEP); sprintf(class, "%s/%s", ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_SLEEP); } else if (!strcmp(hid, ACPI_BUTTON_HID_LID)) { button->type = ACPI_BUTTON_TYPE_LID; handler = acpi_lid_notify; - strcpy(name, ACPI_BUTTON_DEVICE_NAME_LID); + strscpy(name, ACPI_BUTTON_DEVICE_NAME_LID); sprintf(class, "%s/%s", ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_LID); input->open = acpi_lid_input_open;