Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3183567ybi; Sun, 2 Jun 2019 08:58:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqwsmdMuS59V069CH46iLiHvbktz0PJpoYBS1+4mhFxnSoDbB5RYhCd0Hm3kuAdqkHJiRkQa X-Received: by 2002:a17:902:8d92:: with SMTP id v18mr567839plo.211.1559491112830; Sun, 02 Jun 2019 08:58:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559491112; cv=none; d=google.com; s=arc-20160816; b=KxPV4eit5S8fpH3WpB527M8Jo85215aaWFIZW/QJ/8E5qtjV9+Aq/oojEwu1h+rVo1 c2jBARRJBAuUp+Rv+Ih4mdFSNBDCeeSb2y0QJtZb708FN9q30KwMAxg1G0rDX3/b0zz7 PKI7pXe6bLriANYqeoiDHo1TrHZz0wyMx6x1n/UG9yWIDrUVseKhaayzwPoL4AuoyWKy Bgkeogako/n0liIURXiND6f7faqBONrMU7EF+iD2zWIjO5V0SQAKIO/WTOdteRZ26eD9 BsrNom0ykqY9WwzcW2KWj7xH+Hvhj5X8/8qYTukKL2sn7BZ0Uz70BHi8oYvtyEGOKhR1 2hOg== 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 :reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=nhWOILuDvP2H60A9rApnGdMVLdYuriaJlseg1jGSqdQ=; b=IGl5qwaxQNiQGwUEKtaQrvFBtLyLOx/EobJK953Rj5kD5Kb9TYRIrt/ehgPaoBPaFK 3VkFT2iaYueqQ64Snly7XpOfEYizesh7n/xdhjhGc13LM5VPi5qw2lRxmY2uV6GN/wVP 5Ls2sWyMbY8SXE8pAAH90S8Zi0RfeRP+Hl3WnPvuQlc6EHyvBdXBJZX0Fcz18q81UDdr 6OkCMXlis7ODW4IRt19qHyhvH5J5GsnM1BzdgUJO0rfhNNsw4QsLzqlvwBjwNC7NqKvr WpPwthnwm4miltO4qt1/PTNs+dUEbTmduqmxSk5FZrpp5/bkuJWQQn5WylcjG5NHOtk1 P9+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DeoIg8Xw; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q10si14577802plr.412.2019.06.02.08.58.06; Sun, 02 Jun 2019 08:58:32 -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=@gmail.com header.s=20161025 header.b=DeoIg8Xw; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726594AbfFBP4Y (ORCPT + 99 others); Sun, 2 Jun 2019 11:56:24 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:44715 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726168AbfFBP4X (ORCPT ); Sun, 2 Jun 2019 11:56:23 -0400 Received: by mail-wr1-f65.google.com with SMTP id w13so9623682wru.11 for ; Sun, 02 Jun 2019 08:56:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:reply-to:mime-version :content-transfer-encoding; bh=nhWOILuDvP2H60A9rApnGdMVLdYuriaJlseg1jGSqdQ=; b=DeoIg8Xw5PtlIzybCBSjdIPhrA3kAG6nZ/TE5TVmgL9bCJAunkXWYflmFZQufVMueO k/QnCn3h6D4TQ3C+bSh07/lPKKwQsSqkQjy0nHm8YG8L1f60q8gAic+NWLqD97R05ccY NtKIv8iXkUJajf9M7eT2ckKUjvxwE6BxxuWPwVQvJPoV+klCP/nf3RAhCJ6FIffOldib OFqVCq8mqcqyKz984Gkm6Gjv0O+cXSGiN9MoN2vpbf1ERxjD6L838INS0Hj5HfUluTZz k0nTRrPQaPOZLqS2gAUWf0EYYjY5ZKwwmYjiruhkT8UkMAXMwyA2MdhZKiufc1AHrrys xXnw== 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:reply-to :mime-version:content-transfer-encoding; bh=nhWOILuDvP2H60A9rApnGdMVLdYuriaJlseg1jGSqdQ=; b=HA5RQLvy7zLtPYhzf1zdUE4Py5idWU69EwPBG8zDNPodtlyHI9VkAYAyo4HwFRV0Dn i9dlT+9Eps8m1jJ8/DQN6NR2iEUwPN3LVyD+f06oGJ/Ec18Civp8Dd6eKsOpaNcixWPz gSmU1Ma3ziNO5XDoNV042uRmngtgr4Y9lpQrz2rqKLP9RwxjbLCZuaKho4gFgcfEt/5u POsSLTJkWT+92LWO56e9hpVQEgQFrQkf+V5wVOAKt9j2s2BLVkc1NCIyVdfbh2zWZ20/ DxzIlf4OuVLKLPAdld8F+HDMkzbGCLo+3vnTd4IFExKj1I8vlAq0JcSwq60RAFqIe/Yb 1MKQ== X-Gm-Message-State: APjAAAVpYMs7ZxLVoH5+BlOSnxlRdMKbbGhyzlt2fIpQqWLU+sO4QWB8 7Fp2yNnacGP51ABH6P2dgWg3cQEwrZpsrQ== X-Received: by 2002:adf:df87:: with SMTP id z7mr13760130wrl.8.1559490980759; Sun, 02 Jun 2019 08:56:20 -0700 (PDT) Received: from p200300EEEE2F.fritz.box (p200300C98712670014A3D3D52C57F0B4.dip0.t-ipconnect.de. [2003:c9:8712:6700:14a3:d3d5:2c57:f0b4]) by smtp.gmail.com with ESMTPSA id p13sm9508823wmb.23.2019.06.02.08.56.19 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 02 Jun 2019 08:56:20 -0700 (PDT) From: Emanuel Bennici To: linux-kernel@vger.kernel.org Cc: Bjorn Helgaas , Joe Perches , Lukas Wunner , Andy Shevchenko , Tyrel Datwyler , "Rafael J. Wysocki" , Arnd Bergmann Subject: [PATCH] pci: ibmphp: Replace functionname with __func__ in Messages Date: Sun, 2 Jun 2019 17:56:17 +0200 Message-Id: <20190602155619.21992-1-benniciemanuel78@gmail.com> X-Mailer: git-send-email 2.19.1 Reply-To: benniciemanuel78@gmail.com MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace the hardcoded Function-Names in error and debug Messages with the __func__ Macro. If the Function-Name changes we haven't to check all the error/ debug messages. Signed-off-by: Emanuel Bennici --- drivers/pci/hotplug/ibmphp_core.c | 34 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c index 17124254d897..59840a094973 100644 --- a/drivers/pci/hotplug/ibmphp_core.c +++ b/drivers/pci/hotplug/ibmphp_core.c @@ -194,7 +194,7 @@ static inline int power_on(struct slot *slot_cur) return retval; } if (CTLR_RESULT(slot_cur->ctrl->status)) { - err("command not completed successfully in power_on\n"); + err("command not completed successfully in %s\n", __func__); return -EIO; } msleep(3000); /* For ServeRAID cards, and some 66 PCI */ @@ -212,7 +212,7 @@ static inline int power_off(struct slot *slot_cur) return retval; } if (CTLR_RESULT(slot_cur->ctrl->status)) { - err("command not completed successfully in power_off\n"); + err("command not completed successfully in %s\n", __func__); retval = -EIO; } return retval; @@ -224,8 +224,8 @@ static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 value) struct slot *pslot; u8 cmd = 0x00; /* avoid compiler warning */ - debug("set_attention_status - Entry hotplug_slot[%lx] value[%x]\n", - (ulong) hotplug_slot, value); + debug("%s - Entry hotplug_slot[%lx] value[%x]\n", + __func__, (ulong) hotplug_slot, value); ibmphp_lock_operations(); @@ -242,7 +242,7 @@ static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 value) break; default: rc = -ENODEV; - err("set_attention_status - Error : invalid input [%x]\n", + err("%s - Error : invalid input [%x]\n", __func__, value); break; } @@ -255,7 +255,7 @@ static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 value) ibmphp_unlock_operations(); - debug("set_attention_status - Exit rc[%d]\n", rc); + debug("%s - Exit rc[%d]\n", __func__, rc); return rc; } @@ -265,7 +265,7 @@ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 *value) struct slot *pslot; struct slot myslot; - debug("get_attention_status - Entry hotplug_slot[%lx] pvalue[%lx]\n", + debug("%s - Entry hotplug_slot[%lx] pvalue[%lx]\n", __func__, (ulong) hotplug_slot, (ulong) value); ibmphp_lock_operations(); @@ -282,7 +282,7 @@ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 *value) } ibmphp_unlock_operations(); - debug("get_attention_status - Exit rc[%d] value[%x]\n", rc, *value); + debug("%s - Exit rc[%d] value[%x]\n", __func__, rc, *value); return rc; } @@ -292,7 +292,7 @@ static int get_latch_status(struct hotplug_slot *hotplug_slot, u8 *value) struct slot *pslot; struct slot myslot; - debug("get_latch_status - Entry hotplug_slot[%lx] pvalue[%lx]\n", + debug("%s - Entry hotplug_slot[%lx] pvalue[%lx]\n", __func__, (ulong) hotplug_slot, (ulong) value); ibmphp_lock_operations(); if (hotplug_slot) { @@ -305,8 +305,7 @@ static int get_latch_status(struct hotplug_slot *hotplug_slot, u8 *value) } ibmphp_unlock_operations(); - debug("get_latch_status - Exit rc[%d] rc[%x] value[%x]\n", - rc, rc, *value); + debug("%s - Exit rc[%d] rc[%x] value[%x]\n", __func__, rc, rc, *value); return rc; } @@ -317,7 +316,7 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value) struct slot *pslot; struct slot myslot; - debug("get_power_status - Entry hotplug_slot[%lx] pvalue[%lx]\n", + debug("%s - Entry hotplug_slot[%lx] pvalue[%lx]\n", __func__, (ulong) hotplug_slot, (ulong) value); ibmphp_lock_operations(); if (hotplug_slot) { @@ -330,8 +329,7 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value) } ibmphp_unlock_operations(); - debug("get_power_status - Exit rc[%d] rc[%x] value[%x]\n", - rc, rc, *value); + debug("%s - Exit rc[%d] rc[%x] value[%x]\n", __func__, rc, rc, *value); return rc; } @@ -360,7 +358,7 @@ static int get_adapter_present(struct hotplug_slot *hotplug_slot, u8 *value) } ibmphp_unlock_operations(); - debug("get_adapter_present - Exit rc[%d] value[%x]\n", rc, *value); + debug("%s - Exit rc[%d] value[%x]\n", __func__, rc, *value); return rc; } @@ -711,8 +709,7 @@ static u8 bus_structure_fixup(u8 busno) for (dev->devfn = 0; dev->devfn < 256; dev->devfn += 8) { if (!pci_read_config_word(dev, PCI_VENDOR_ID, &l) && (l != 0x0000) && (l != 0xffff)) { - debug("%s - Inside bus_structure_fixup()\n", - __func__); + debug("%s - Inside %s\n", __func__, __func__); b = pci_scan_bus(busno, ibmphp_pci_bus->ops, NULL); if (!b) continue; @@ -885,7 +882,8 @@ static int set_bus(struct slot *slot_cur) return retval; } if (CTLR_RESULT(slot_cur->ctrl->status)) { - err("command not completed successfully in set_bus\n"); + err("command not completed successfully in %s\n", + __func__); return -EIO; } } -- 2.19.1