{"id":2224802,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2224802/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-gpio/patch/20260418191125.26925-1-yashsuthar983@gmail.com/","project":{"id":42,"url":"http://patchwork.ozlabs.org/api/1.1/projects/42/?format=json","name":"Linux GPIO development","link_name":"linux-gpio","list_id":"linux-gpio.vger.kernel.org","list_email":"linux-gpio@vger.kernel.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260418191125.26925-1-yashsuthar983@gmail.com>","date":"2026-04-18T19:11:24","name":"pinctrl: pinconf-generic: Use kmemdup_array() over kmemdup()","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"bcf9a5e5a51be597a41b088a72cedeee9fdc01a7","submitter":{"id":93186,"url":"http://patchwork.ozlabs.org/api/1.1/people/93186/?format=json","name":"Yash Suthar","email":"yashsuthar983@gmail.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-gpio/patch/20260418191125.26925-1-yashsuthar983@gmail.com/mbox/","series":[{"id":500463,"url":"http://patchwork.ozlabs.org/api/1.1/series/500463/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-gpio/list/?series=500463","date":"2026-04-18T19:11:24","name":"pinctrl: pinconf-generic: Use kmemdup_array() over kmemdup()","version":1,"mbox":"http://patchwork.ozlabs.org/series/500463/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2224802/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2224802/checks/","tags":{},"headers":{"Return-Path":"\n <linux-gpio+bounces-35225-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-gpio@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=lygkBmW8;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-gpio+bounces-35225-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"lygkBmW8\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.216.47","smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fyhG94lVjz1yGt\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 19 Apr 2026 05:12:33 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 20F8E303A5D2\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 18 Apr 2026 19:11:37 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 5D73D33B6C8;\n\tSat, 18 Apr 2026 19:11:36 +0000 (UTC)","from mail-pj1-f47.google.com (mail-pj1-f47.google.com\n [209.85.216.47])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 66E32331209\n\tfor <linux-gpio@vger.kernel.org>; Sat, 18 Apr 2026 19:11:34 +0000 (UTC)","by mail-pj1-f47.google.com with SMTP id\n 98e67ed59e1d1-35da1af3e10so1850297a91.3\n        for <linux-gpio@vger.kernel.org>;\n Sat, 18 Apr 2026 12:11:34 -0700 (PDT)","from yash-Bravo-15-B5DD.local ([14.99.167.142])\n        by smtp.gmail.com with ESMTPSA id\n 98e67ed59e1d1-36140ff148dsm5549142a91.7.2026.04.18.12.11.30\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Sat, 18 Apr 2026 12:11:32 -0700 (PDT)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776539496; cv=none;\n b=Dpq2m4af8eWveiBdxDFXxYkQfQzXb7Gx8qHTN5H+HoE5pTqOircNSCGOE73y27DwQC/AfVeUDPFqiRXY6Dd7B+YGhX4WqlyX2lIp8GNCz5A3g3D893gZ5ed0Bk3upvUc90AaUs5yAfB3yse5mDyjBhEhdDVPwaxxbBlOpcjWwrs=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776539496; c=relaxed/simple;\n\tbh=QuEQxYNSSYDlBxtNYRRY/Ah0N6OsfCulkyGo4LLrmn8=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=J3N5+NdIYMyM3yuwaNfjJT3ap7urBG/ca50qi5EAd02GuEBRPFjEOS6Ih1gfks2EAVLa6cch7PcWlwKzyHkMHzvDzXPai9bgS3pLnrZ/fznkTodZTn/iK7V8no4QwBdEKqqstrzoBjgL1GEfRHfaS3O2qO9GOPupQlFoxkNUDNs=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=lygkBmW8; arc=none smtp.client-ip=209.85.216.47","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1776539494; x=1777144294;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:from:to:cc:subject:date:message-id:reply-to;\n        bh=3f3NWwwGjda6a6KYRAcwpn+DeJKRTTACZGUkh8g/ZSk=;\n        b=lygkBmW8t3FzloVewJREtX4yft6kNMZglJpG/3Phw3g6c8+uWVbwGMLmupTM/wbTWK\n         FGKl9k6GWr6kpQA7LzofZ1wM0sIYPovKyswF5iP1tF0nn3UkgnEL3Tc0Zye+IjZV2P92\n         HJGHR7Lyzivsa9pX2kLNPSoZRtVDhGS7kYJa9RqiNzdhmSUsHnXSbIQeyYYzhvpt9txF\n         EE6M/TthXrrE/NHRxHDRqmhOTIt07ZeUE8IGSQM4V5s6YFfiHdgdSn03ERqfjLKim/ZM\n         6tbD65buu9tSAyNYtiLItyFd5GSuYA3Mk4+gMDyKYCRY2uU8VDHU6Sy4fgorG2QYftda\n         QwbQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776539494; x=1777144294;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=3f3NWwwGjda6a6KYRAcwpn+DeJKRTTACZGUkh8g/ZSk=;\n        b=oEG7k58f+SrDg7h0a++g7cIrCQUr9PAHbGvKja+yRq+MfaYH7MUPAWcxj9RY1zd1bv\n         qzPmgfAeD+qJpk6f8RVQ+YkO32tZSMAuNlH3k1l5x+pMYtt3T6DXjUAYxgeXHmbQZyMV\n         j/736vXIkOpWcbZjFB9L1Z2zfcA3HXdxYCaRoRtCWg2y43hufKhQLu/cM7hz5AoKGwBk\n         RuCZtG4X3+SGbEvOVgoN8xSQKye0mSyl46WpjGIhNbnHuhPSzyrEi71UApT6HRbS1aTf\n         z2ooi/2+0dvgPT/KtSCx2QdNO47Oq7d1nM6QFWKN38jsop/FArYjEJ3E1R4/6TB9N4qN\n         o1zg==","X-Gm-Message-State":"AOJu0YzK9yuEMFQSRtVfenX8YM4lbLLJNdpCvIp8I9b4ZFn6xjOFhJqZ\n\tlqKihh/IsXJ66JvN9pzrWLF4t47FqJnzVkeCYFCq8fYCWxmBwyTUN7dz","X-Gm-Gg":"AeBDieuKJ/TEMmGxC+YFI8gIZawxt1QNFVwDW/Or3+EmQG6UXLrvvzE+aAER4jU7eXu\n\tjKfMuLOLIxFMiReQ2q7TGUCJpyY7ZfqJj6hih0rJslq6uwb8jU2pDER0N0HJorv0fsZb0NS3Oit\n\t+OHS/Z8WJ7HvlpLizdRCszbagidW4Hx6h7Y1nNY45FiFAV6EcHFo25sjGQHjQWDA9GiskRY3Kom\n\tJ6VUjWHkgurARjQDWp6L+wTUQ0DWxRadkpKn5+tR64y24e3IAuh/teoPtIujoJH+0SsOc9e5uo2\n\tmdSdsuo1ENudvUa2FeleCA5EWio5O2mU8TY8AhPXg7+UBEp2kYcSojpH62C/C49phxUK91Wra4y\n\tqGe8oc2T+upQzM2KePA1NFJB99BY8Oh/3epJKhjBxVLnJUaHPnxwaEXuUtLvebh+d+/jbtGE7cG\n\tow2vVp2E+Gv0/DK0yU8w0o4kvrCjuCdUfPFcGOt84myY2a+9GS8sRMgBQ=","X-Received":"by 2002:a17:90b:4b44:b0:361:3224:2f65 with SMTP id\n 98e67ed59e1d1-361403bdd07mr7876514a91.3.1776539493601;\n        Sat, 18 Apr 2026 12:11:33 -0700 (PDT)","From":"Yash Suthar <yashsuthar983@gmail.com>","To":"Linus Walleij <linusw@kernel.org>","Cc":"linux-gpio@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tYash Suthar <yashsuthar983@gmail.com>","Subject":"[PATCH] pinctrl: pinconf-generic: Use kmemdup_array() over kmemdup()","Date":"Sun, 19 Apr 2026 00:41:24 +0530","Message-ID":"<20260418191125.26925-1-yashsuthar983@gmail.com>","X-Mailer":"git-send-email 2.43.0","Precedence":"bulk","X-Mailing-List":"linux-gpio@vger.kernel.org","List-Id":"<linux-gpio.vger.kernel.org>","List-Subscribe":"<mailto:linux-gpio+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-gpio+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit"},"content":"using kmemdup_array instead of kmemdup ,as it is more\nreadable and matches the intent of the api.\ntested with w=1, no new warnings introduced.\n\nSigned-off-by: Yash Suthar <yashsuthar983@gmail.com>\n---\n drivers/pinctrl/pinconf-generic.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)","diff":"diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c\nindex 2b030bd0e6ad..b5c1587bf2e6 100644\n--- a/drivers/pinctrl/pinconf-generic.c\n+++ b/drivers/pinctrl/pinconf-generic.c\n@@ -371,7 +371,7 @@ int pinconf_generic_parse_dt_config(struct device_node *np,\n \t * Now limit the number of configs to the real number of\n \t * found properties.\n \t */\n-\t*configs = kmemdup(cfg, ncfg * sizeof(unsigned long), GFP_KERNEL);\n+\t*configs = kmemdup_array(cfg, ncfg, sizeof(unsigned long), GFP_KERNEL);\n \tif (!*configs) {\n \t\tret = -ENOMEM;\n \t\tgoto out;\n","prefixes":[]}