Received: by 10.213.65.68 with SMTP id h4csp246517imn; Fri, 23 Mar 2018 03:51:02 -0700 (PDT) X-Google-Smtp-Source: AG47ELvucPjtbXg9Lp9y86dcaOz8I49HmP3m4lvc8bN7t/OEsRWtTQjj/i/dx7pOnFOFrr3GyQyv X-Received: by 10.101.89.74 with SMTP id g10mr20588405pgu.415.1521802262174; Fri, 23 Mar 2018 03:51:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521802262; cv=none; d=google.com; s=arc-20160816; b=IKxUb1aF6YdQ+9dR8T/SoYsHZ2cz4BlHjWVc/PF1I/0L+4WHS0ib6+0oC3DfydXCMt ZQ/3qEPc7cr/AVve3ae6IUpMoSfJDN4064/9nOOEac+O0F49O/eULkzaCoAE0auZrJKb g1ptNR4KLZeSS4/+4zCbstjinGX2XSUEhNJCsdKIPANSBZ1TCAna9ekju4g3YoX2z2Wa GTTJAafeBGhbq9Sx5wd/ioVklsInVS8PTVffcfVAHO7DoByN6QJxodVtGD19GTcj2nsw IHj2MmPv6EQzub+3eWrJyAz+EzIX4Y7dcDLCVm7n8V3YWKKyl6He5ZMfrdlj15rxM4lb Nk2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=xMYxXcI03e1zNf9e/qotf6eWC3Mf8+C0QSfe13/87OE=; b=0LZ/j+v1dR5vm5UVU6v8qZSlUbZzyBfGsvi0XXHecCSbXiUPBojBP/bKhumYqRZhUM JBkc5h8UrckY/TgTFWC+6L/OMe/4KhEdEAKdKXTXi6xajY88hc0OXPUI/B/byIx+sRX3 nUjHNgVzc5+95kqmwZ33xZIi3zSPc45jQu4cLGu55mGF0khnZ4/Abi6czdny0PWcSW3c oMldb7yKVb+PJSjVsn6ePTdTiZbvsvaOQSQ6QKQdgmMQhblillWbJgzOwtGCufiNz2Yk dLSQM8QX8z6djMIRmw9JSR4O3VrYtzSH+8oHsowed0gYm8YUSmolDCSRm2Yn87PHfgLc r+1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=vGOZn57G; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w10si5809306pgr.136.2018.03.23.03.50.47; Fri, 23 Mar 2018 03:51:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=vGOZn57G; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755580AbeCWKst (ORCPT + 99 others); Fri, 23 Mar 2018 06:48:49 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:43849 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754917AbeCWKsq (ORCPT ); Fri, 23 Mar 2018 06:48:46 -0400 Received: by mail-lf0-f66.google.com with SMTP id v207-v6so17620851lfa.10 for ; Fri, 23 Mar 2018 03:48:46 -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:mime-version :content-transfer-encoding; bh=xMYxXcI03e1zNf9e/qotf6eWC3Mf8+C0QSfe13/87OE=; b=vGOZn57GdBeMiYZ3Tff9Q/q6YkrO0fArCYQkNxe2JxLczQn5ST8TGWL1aYzfHcKEOc n8GT8eRhnf2h6DiYZF0JpsM7jrm9wD12WnI+vtkMmQDs5B9+gQrwo2tZ5jpzKJRFkY+9 uB6XCextUFy+sqalc3UcdyCIZzMQF5VUi2iCIcptiybWGmUrbiKETmZxepayLx73XRG3 p6c7e2ky371P6S7XOerb8XkCCyP50VaNQNfvcY+gaC9znVU/4srRqc7w+sbldiSUfYRj dLCbX0epENxgcXtPDZPWd4M2w7BXy59JWjJs5TvTWGpH7VA7ejG7YNnS2qPFZTXqN4pq nL+A== 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:mime-version :content-transfer-encoding; bh=xMYxXcI03e1zNf9e/qotf6eWC3Mf8+C0QSfe13/87OE=; b=IEfk+GnqEntsonITp1chW72K8oWOVLlkPvX9PoWSQe10OlAJi5K4pFIZAf+pnsSJV7 7cYJwCmqQYYbYtI49mistZLhrCKZh/f/qaULUF/QUO13QHv7rzrZMNDlEydN9lq5DCXa X24zw9hY0aZjC9actFxD6LCl5fewnsVxbq8nOM3dcvNKG2ri5LtvopeiKe27z61KHM7Y FDti1TGfATQYc2J1NkLwRgt/Kq4P2csfEZhgKlB2O1luTDKe54e/rTAfUHE3DXzqUNGE mYUnLOLg4+VPMOyLSUje/CgHf/AxBZMspAEVOvzdRLu6+lNwze08JyZ0pooJMk4UxycH lMvQ== X-Gm-Message-State: AElRT7GcL39XY5L4ge6scOTCckY+wHsgcgmERpbcBHEerf3cL9wD2lLC R9BkTcvC52672MkTprHPnvNj9g== X-Received: by 10.46.135.139 with SMTP id n11mr7303252lji.65.1521802125215; Fri, 23 Mar 2018 03:48:45 -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 26sm1813804ljt.86.2018.03.23.03.48.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Mar 2018 03:48:44 -0700 (PDT) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: linux-block@vger.kernel.org Cc: linux-kernel@vger.kernel.org, =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [PATCH] lightnvm: remove function name in strings Date: Fri, 23 Mar 2018 11:48:12 +0100 Message-Id: <20180323104812.31180-1-mb@lightnvm.io> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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__); } } -- 2.11.0