From patchwork Thu Dec 14 14:29:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 848583 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=bgdev-pl.20150623.gappssmtp.com header.i=@bgdev-pl.20150623.gappssmtp.com header.b="SC/IZp9a"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yyGDz0RBgz9sCZ for ; Fri, 15 Dec 2017 01:30:26 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752506AbdLNO32 (ORCPT ); Thu, 14 Dec 2017 09:29:28 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:35795 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751600AbdLNO30 (ORCPT ); Thu, 14 Dec 2017 09:29:26 -0500 Received: by mail-wr0-f196.google.com with SMTP id g53so5329530wra.2 for ; Thu, 14 Dec 2017 06:29:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=ABcDHDeI8TZqOZ/UR1Hoqvkur4GpBBKVKsuIztoRmfs=; b=SC/IZp9amIaGgTDi1dtQHE6EI3cRFyQ0tiYMeEkYeaWbl2UCWMKwOS+0++qCK+tTs5 0cULedgPq2kqM4xgLDVZcWKk6q2uDsBWIISmdPBoXTe7am1OClaMWumyiphA3Mflmina CpWDjhXqxjiJtiV7uCJtxjp9cPlzg+1G4RAGGfnNb0wxeJF19ntbbMyvEScDC/OYarc2 NF50uzCn7ROoF67KHEFDqOKmYuLJTF8gXuGX86qILREqVmbqLsaJ/uebeu3UZNL63BBj wTi8TpRYBMEGPZSdcQ9BKr6/lzD3dhmImcHE5YlTUpKv1DJBgP7sTqN9G1ODz+XTmJBy 91UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ABcDHDeI8TZqOZ/UR1Hoqvkur4GpBBKVKsuIztoRmfs=; b=O74oyZ3VEmFxZJr/Ylf9qwGuo6ZP6gFRrK6TKYeAKjydAvnSu2SVN2QgEaO+w4Ag0m TvfPrZLcayYGHkjwROL8VE7BmCXBstCCmuZmDQX3i8DpSO2vlmBPSFsy97UPwQympw4G dekjs7CG6IWK4LpgFb5YEpEFFSmVe4RlMNVtCuUE80sSoHkz5568/uU+vaPr7QbcpyYB nyPR+KXRli0TfpFgcE1oSAUR2c4quwbjnks3adPoWp7/vFgW93elFsFr+W2cnzZs+2Ca QEbZLeUrJQHSrWyBLAwNx+8BiacNqbI3sOrdwQ4IVKvX8vQwo1Lnezw7Naytwz5gh5dw 3Q/Q== X-Gm-Message-State: AKGB3mKgDB+udLkiJ+PexBrCY2c4/KNssFBRa6m7GXoVrlKKOm/6jx4P h1roHgDHYGy1/Ho55zn2jFPOpQ== X-Google-Smtp-Source: ACJfBou9s7Cy+P78PxYfUQOOwAtNoQHJrA09u84OgpDtFIbxsmDmtkwchZxIwBiUdFCM5LnwHccXiA== X-Received: by 10.223.187.207 with SMTP id z15mr5821395wrg.168.1513261765784; Thu, 14 Dec 2017 06:29:25 -0800 (PST) Received: from localhost.localdomain (smb-orycl-01.wifihubtelecom.net. [213.174.123.193]) by smtp.gmail.com with ESMTPSA id 88sm1485109wrf.20.2017.12.14.06.29.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Dec 2017 06:29:25 -0800 (PST) From: Bartosz Golaszewski To: Linus Walleij , Joe Perches Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v2 0/2] gpiolib: gpio_device label improvements Date: Thu, 14 Dec 2017 15:29:18 +0100 Message-Id: <20171214142920.32683-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.15.1 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Avoid unnecessary memory allocations with kstrdup_const(). v1 -> v2: - use a ternary operator instead of an if/else in patch 2/2 Bartosz Golaszewski (2): gpiolib: constify label in gpio_device gpiolib: use kstrdup_const() for gpio_device label drivers/gpio/gpiolib.c | 9 +++------ drivers/gpio/gpiolib.h | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-)