From patchwork Thu Mar 29 22:05:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matias Bjorling X-Patchwork-Id: 10316485 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BA49D60383 for ; Thu, 29 Mar 2018 22:08:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A32D22A534 for ; Thu, 29 Mar 2018 22:08:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9646D2A536; Thu, 29 Mar 2018 22:08:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FEA12A534 for ; Thu, 29 Mar 2018 22:08:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751194AbeC2WHx (ORCPT ); Thu, 29 Mar 2018 18:07:53 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:35987 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752794AbeC2WHq (ORCPT ); Thu, 29 Mar 2018 18:07:46 -0400 Received: by mail-lf0-f67.google.com with SMTP id z143-v6so10349236lff.3 for ; Thu, 29 Mar 2018 15:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xMYxXcI03e1zNf9e/qotf6eWC3Mf8+C0QSfe13/87OE=; b=Kgl4oFeTv7HvZlQX1D5gsTBPdwWqrsp97hjaXNYmXW7H0BFCTa7UoCmnYObNlXjSOD 0cEmwYBUXU3YSIHDvtJgvxa9AaRMXxaHCZykna2d4BZ9Q676DluRs/DeXKIEzDXRWXea QA/BFCw6FWUgymlDEP+Uk5CbQ6kjZh1b3T/knYH8WFHZN5B6S0DaBfTB7sDxlfjqLOu6 xZF1C2XhWcL+KBSToHTC9sv899MN1LIasHy9rAp5gre5niZldChmlS0Z5cOQi4/53p8j 73pQ9fhwYvOr8PaliueaRpLfNOd0L8EApHRR0hK1JROEAyPXNCd0anulbDvowtXzsAto 489w== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=xMYxXcI03e1zNf9e/qotf6eWC3Mf8+C0QSfe13/87OE=; b=FobN/jNUIkgzAc+n3j5aRJZqKR4rz78P+Of1UXqxY7FNDKjKDagaOBiEpucjKRDxtC dTC0kWCQy/r2u2UM6nmoHVAeAScYo9p8Lpv1Q3aFaHYw9xECYeB6PjR35CnGoawQRb4c O9RRYXkSjyWOZpelPtsWLq7px1RO+pLesP2MSqDFad3pHl7TA0DknUPftsnLELWaBztC PHHYnxLMgtr324wC8kFF5m0zTOEAIENomB+1I4kS1Nz4AMJ8zdlXsHaOMIH7IctKHoth M2u9iypWK0xzlWdMsIFYA2K3W8md4ntbpWRxgzvj4N/iGd6Kj/JCimV3QzrITFlOvC1G 4Feg== X-Gm-Message-State: AElRT7FbTnCytoO8c/6TpcNxRSyCPxQZYZDhp4N1YffGEReRgyzP9chs bnP7nZ7MYf1A/4FnuidFgyCfrQ== X-Google-Smtp-Source: AIpwx4+hPgv85gMiFO6Q785z8ucQSoodj+CNGJ/CxDHdHrYfGY2MNGcmEGPRMXleU0BfvM8aYAmd4w== X-Received: by 10.46.154.70 with SMTP id k6mr6354889ljj.63.1522361259815; Thu, 29 Mar 2018 15:07:39 -0700 (PDT) Received: from Macroninja.cnexlabs.com (x1-6-a4-08-f5-18-3c-3a.cpe.webspeed.dk. [188.176.29.198]) by smtp.gmail.com with ESMTPSA id i89-v6sm1365508lfk.12.2018.03.29.15.07.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Mar 2018 15:07:39 -0700 (PDT) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: axboe@fb.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, keith.busch@intel.com, javier@cnexlabs.com, =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [GIT PULL 37/37] lightnvm: remove function name in strings Date: Fri, 30 Mar 2018 00:05:24 +0200 Message-Id: <20180329220524.30363-38-mb@lightnvm.io> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180329220524.30363-1-mb@lightnvm.io> References: <20180329220524.30363-1-mb@lightnvm.io> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For the sysfs functions, the function names are embedded into their error strings. If the function name later changes, the string may not be updated accordingly. Update the strings to use __func__ to avoid this. Signed-off-by: Matias Bjørling --- drivers/nvme/host/lightnvm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index ffd64a83c8c3..41279da799ed 100644 --- a/drivers/nvme/host/lightnvm.c +++ b/drivers/nvme/host/lightnvm.c @@ -1028,8 +1028,8 @@ static ssize_t nvm_dev_attr_show(struct device *dev, } else { return scnprintf(page, PAGE_SIZE, - "Unhandled attr(%s) in `nvm_dev_attr_show`\n", - attr->name); + "Unhandled attr(%s) in `%s`\n", + attr->name, __func__); } } @@ -1103,8 +1103,8 @@ static ssize_t nvm_dev_attr_show_12(struct device *dev, return scnprintf(page, PAGE_SIZE, "%u\n", NVM_MAX_VLBA); } else { return scnprintf(page, PAGE_SIZE, - "Unhandled attr(%s) in `nvm_dev_attr_show_12`\n", - attr->name); + "Unhandled attr(%s) in `%s`\n", + attr->name, __func__); } } @@ -1149,8 +1149,8 @@ static ssize_t nvm_dev_attr_show_20(struct device *dev, return scnprintf(page, PAGE_SIZE, "%u\n", geo->tbem); } else { return scnprintf(page, PAGE_SIZE, - "Unhandled attr(%s) in `nvm_dev_attr_show_20`\n", - attr->name); + "Unhandled attr(%s) in `%s`\n", + attr->name, __func__); } }