From patchwork Fri Mar 23 10:48:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matias Bjorling X-Patchwork-Id: 10303941 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 9068D60385 for ; Fri, 23 Mar 2018 10:48:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 813F32892C for ; Fri, 23 Mar 2018 10:48:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 758FD28D62; Fri, 23 Mar 2018 10:48:51 +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=ham 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 E39832892C for ; Fri, 23 Mar 2018 10:48:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755181AbeCWKss (ORCPT ); Fri, 23 Mar 2018 06:48:48 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:41551 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754915AbeCWKsq (ORCPT ); Fri, 23 Mar 2018 06:48:46 -0400 Received: by mail-lf0-f65.google.com with SMTP id o102-v6so17594483lfg.8 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=LjysC24ikoK1zHivtcjWKfQyMoXRwY1tS3umwk1BK+bJ4fnI3GN7FUU3T7SEDgWoLe SN91fyeMYMVWQHO7d17ua00G+ZNPTFekWsoICL+DGh6O4bG+6xg8o/KKaL3Q2vlOklsl NlAMfFhoInNHPL4ke+EVJp+QNnEiNucr4oTe+E8/M+c0ylqGJUejnLhmZEq7oHqoKTMO TftSYGCWgBR5TuzilhOpt9Ma+wQlv6noGG2Oj+OkRWiN+VqCHGeL+/BVhtbznUa0gW6l YScGyjR3NZn44ybTYsWaKzo07J0Qbojv4/qUSgREFHS49GVcy0I5gaNTtsUdtQfMwCsI Y9EQ== X-Gm-Message-State: AElRT7FQVPjnYUMno7arddOgGfuXs/cnjoRi+jkma2SDymNLtQHA3BPj 8DCFHiG/BAuzkyir71/xi6rY+MIW X-Google-Smtp-Source: AG47ELtOYq8qA14+xcnuPwaAlf5Uv/pe989J2CDTDDbJ+5uT8FldMTY6rJgGYITqeqKBJ/X7CcTHNw== 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 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__); } }