Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2245152lqb; Mon, 27 May 2024 12:46:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV1wLknXZYZlZHZ1hq8r9FJwlhg0a2lGPRnTwHDOGZcaKHzlCjUFPAjOyqMJ/lMm+gKQiM3upfmcMYF9ItwgUsusskieCu/aASAFir5+Q== X-Google-Smtp-Source: AGHT+IHf1Lr/c1m/ObeAXn6UMnxGcW5p4GUdkszupUPpPtuTLTM6j9mBWxy2bx0gj5RaMlYqjh/e X-Received: by 2002:a17:906:1991:b0:a5a:5496:3c76 with SMTP id a640c23a62f3a-a6264192fe8mr682189066b.6.1716839188748; Mon, 27 May 2024 12:46:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716839188; cv=pass; d=google.com; s=arc-20160816; b=HAGNxQWXDc1Wlb75QbnYjCX6teiaDg0AKMcxShIu+9eHUF5bCAhOBk+iNiZmVToqHs yxlyylSjdVObNbHx+6P6A7eMMokdIl+6TxWpoXIWMfmcz7cYqxRUH8qg1WmPMbKi/0li BhLmlv3dYr5pNpvKD9ck9XrMiy0qmMFza6mj4RHWvLQOIEpDCWGSEUbI5lBuii3F0ygR sUGl7UB2NmmwIZQZ2BJUmyQver6gk1k8AID3sdPd+pJPYIUC5gdzvzWgiIVPrsLcRWjj fkjPcUJ+6N+Kw2jUBrkEWAzpfO6arQ0PPRDPAq+zH9fd4yZ3JEwJCWIrta3jrSDGxZ3F nkpg== 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:dkim-signature; bh=rTl6IrIa+G4LMhRu5xAux6Zx02fHfcpRAhnP/gxP1yQ=; fh=pz0Bwp3UDxyH4Zbk8USs1ngnPDIche8mdRSct3PQgRM=; b=LhEalXw6EnFoWp9blYvl8SYPeHeFbvmwMQ9Ps2392MpdL1TaOQ8N7KqyS0QVEm4+UT WjCenEu1V9pFv7WZRdAnmbxdW4uW1lMfioTh0mIRNX3gwUvHLQEafaPV52Mp3D5pm31l cKglPOOdVLQ6QMxQyJe7wmkfUx3/fMEcIXE4cjoCEqfIs89Q62syU63uIG/x8CLYvJbl jpnySlNdJgHgsxVOFUwRYxxOVXxe6taySXm4S3NoYNSm8OR0fic1HFwWGDbso17g4FD8 cEjPqm6rQZ3LH6lT4JViatguI11p7eU1Shq6kHx33s/ZezKLxKdEH6vl739iDQJUzBuT ZGUQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=Ufyk4Ag1; arc=pass (i=1 dkim=pass dkdomain=bgdev-pl.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-191373-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191373-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a62b4f90d63si272390966b.880.2024.05.27.12.46.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 12:46:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191373-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=Ufyk4Ag1; arc=pass (i=1 dkim=pass dkdomain=bgdev-pl.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-191373-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191373-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 561C31F218BB for ; Mon, 27 May 2024 19:46:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 34D0B17C60; Mon, 27 May 2024 19:46:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="Ufyk4Ag1" Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 6F69A10A11 for ; Mon, 27 May 2024 19:46:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716839181; cv=none; b=S9S3eQQabQDlHZ7zasCcrkUIcWS/lczSLZKArQgp1y6bxuHvJEoeG2Pf8SSim7H8k2YC5s/EOUjmxGH64fPdF1ZRFmL+4mPmUS37F2wuCIpSBX14ykv1nmcpMFvSz4lxOyCDMh5+MFUhlSz/LGzbMrKm2rnG3aJEUb5ExMip7NI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716839181; c=relaxed/simple; bh=rRqysAQWeM6jhpqHiLqjcOu4gGLwxsR8yzfqPRbmEyY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rPGSVUG6vYmWcQiPJLx4aQoA+vJQKsO4uIMCvo74w/P8TuAaVeY+G2saAGf0CPKuUvFy8ZJ19ZkGhUCUmWe8vZh2ebH5kBfYa+j/LkFkK7E0wPPx/OY6A1POYZQ4KHMaou1irp1V8MnA3XqWsIKnTUAkJhXFAsjHTrKlYPgcB1Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=Ufyk4Ag1; arc=none smtp.client-ip=209.85.128.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-4211b3c0ef3so519435e9.0 for ; Mon, 27 May 2024 12:46:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1716839178; x=1717443978; 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=rTl6IrIa+G4LMhRu5xAux6Zx02fHfcpRAhnP/gxP1yQ=; b=Ufyk4Ag1O63Z0Rpll458NoxMHL7PcmsdnMql7Uw1ystnyo5GP1cKKuyZD/UNbLV4ff YUnqDcu7jIhmmx7n/VVNCgSnwBUmylsHNm36kNuqR+rv634o2S4dTVKG72R9jcYJeVf3 cAVXsqjY8/SgYLlqmeNZ/72RZmrKioDKy0Jw8CCQ66Oxg4TH8MVAlHrfgi4R8tRMEBYp cUKJua+AupRDKoDohzf7e0ovNGwC+YHKUkZTH23x2BhKtyXKr9xzMgjAx+Zs2E/nQmZg kT6aIB/UQwDJS6unOmn6AzPdwJ93hdoQmAgz/5MG9PZhH3EOGzzlGDmO/3GFoaVXcz2u /mcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716839178; x=1717443978; 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=rTl6IrIa+G4LMhRu5xAux6Zx02fHfcpRAhnP/gxP1yQ=; b=Z1aegCep7IWjJ/ZC7eS4N2rqHrhwG0Dq487Tgl4KMCaSLtDxRuug0U2Q/Q9pLWHaHl ZQsrluW7L6jWVSGkMq2c40ha2wD9cnL1kn292LkGMO0TZiX1C0U+Y1cwHXNfn2bN3ZvC 82zuf33+jULINXaKLxg+ml8MrxqOt6HwGo66rzmIPoowO3Hya0gccJbJGWDNMaGkDvcS BvbW1O4oYJEoJnZiwALB0OKhBHGfIc9RV0XEJx8h3vpbKJN+W85CNDJIyIWymUZRzYFt bON1cbnWZ8W6TWTQYeTHukU4+T7tY5cdPr8p6F5obPULZbg4Ne8e145TeYDJEtvC2+bO DTtw== X-Forwarded-Encrypted: i=1; AJvYcCXCfZ4PSntc6nQP07A4lhpIG+RP9Ie3c241tH4PRHcVcg7QdCjfla51ij6z7BHhpqCk7Mkyu8IncE4NjicEffJMkwi+vOA30birZOI7 X-Gm-Message-State: AOJu0YxGV5RmAilYzctQPNjp/+XLYCRxJcaqtCK4ZzeCpbnljvsLmMwC c1AKvzJsge4fuTaex2TYOLTzKrKJOMkpgvIpSdaZR4POKICpT6VkiXqiUCOv0f4= X-Received: by 2002:a1c:7717:0:b0:420:2df0:1a9b with SMTP id 5b1f17b1804b1-421089ffaf2mr79420285e9.18.1716839177236; Mon, 27 May 2024 12:46:17 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:75a:e000:c322:131e:ff9d:ef41]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100f5299dsm146868935e9.20.2024.05.27.12.46.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 12:46:16 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH] gpiolib: make gpiochip_set_desc_names() return void Date: Mon, 27 May 2024 21:46:13 +0200 Message-ID: <20240527194613.197810-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Bartosz Golaszewski gpiochip_set_desc_names() cannot fail so drop its return value. Signed-off-by: Bartosz Golaszewski --- drivers/gpio/gpiolib.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index fa62367ee929..07e36e15f71f 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -485,7 +485,7 @@ static struct gpio_desc *gpio_name_to_desc(const char * const name) * 1. Non-unique names are still accepted, * 2. Name collisions within the same GPIO chip are not reported. */ -static int gpiochip_set_desc_names(struct gpio_chip *gc) +static void gpiochip_set_desc_names(struct gpio_chip *gc) { struct gpio_device *gdev = gc->gpiodev; int i; @@ -504,8 +504,6 @@ static int gpiochip_set_desc_names(struct gpio_chip *gc) /* Then add all names to the GPIO descriptors */ for (i = 0; i != gc->ngpio; ++i) gdev->descs[i].name = gc->names[i]; - - return 0; } /* @@ -999,11 +997,9 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data, INIT_LIST_HEAD(&gdev->pin_ranges); #endif - if (gc->names) { - ret = gpiochip_set_desc_names(gc); - if (ret) - goto err_cleanup_desc_srcu; - } + if (gc->names) + gpiochip_set_desc_names(gc); + ret = gpiochip_set_names(gc); if (ret) goto err_cleanup_desc_srcu; -- 2.43.0