Whamcloud - gitweb
LU-17844 lnet: remove a few LCONSOLE_ERROR_MSG() in api-ni.c 98/55098/2
authorTimothy Day <timday@amazon.com>
Tue, 14 May 2024 01:23:34 +0000 (01:23 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 29 May 2024 04:51:34 +0000 (04:51 +0000)
These magic numbers aren't so magical anymore. Just
use LCONSOLE_ERROR().

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I629ef2ceaa51dc1422d87dc056de2c46079438c0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55098
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/api-ni.c

index 4c801e9..94cfaa4 100644 (file)
@@ -609,8 +609,7 @@ lnet_get_networks(void)
        int rc;
 
        if (*networks != 0 && *ip2nets != 0) {
-               LCONSOLE_ERROR_MSG(0x101, "Please specify EITHER 'networks' or "
-                                  "'ip2nets' but not both at once\n");
+               LCONSOLE_ERROR("Please specify EITHER 'networks' or 'ip2nets' but not both at once\n");
                return NULL;
        }
 
@@ -2533,8 +2532,8 @@ lnet_startup_lndni(struct lnet_ni *ni, struct lnet_lnd_tunables *tun)
        mutex_unlock(&the_lnet.ln_lnd_mutex);
 
        if (rc != 0) {
-               LCONSOLE_ERROR_MSG(0x105, "Error %d starting up LNI %s\n",
-                                  rc, libcfs_lnd2str(net->net_lnd->lnd_type));
+               LCONSOLE_ERROR("Error %d starting up LNI %s\n",
+                              rc, libcfs_lnd2str(net->net_lnd->lnd_type));
                goto failed0;
        }
 
@@ -2552,10 +2551,10 @@ lnet_startup_lndni(struct lnet_ni *ni, struct lnet_lnd_tunables *tun)
 
        if (ni->ni_net->net_tunables.lct_peer_tx_credits == 0 ||
            ni->ni_net->net_tunables.lct_max_tx_credits == 0) {
-               LCONSOLE_ERROR_MSG(0x107, "LNI %s has no %scredits\n",
-                                  libcfs_lnd2str(net->net_lnd->lnd_type),
-                                  ni->ni_net->net_tunables.lct_peer_tx_credits == 0 ?
-                                       "" : "per-peer ");
+               LCONSOLE_ERROR("LNI %s has no %scredits\n",
+                              libcfs_lnd2str(net->net_lnd->lnd_type),
+                              ni->ni_net->net_tunables.lct_peer_tx_credits == 0 ?
+                              "" : "per-peer ");
                /* shutdown the NI since if we get here then it must've already
                 * been started
                 */
@@ -2610,8 +2609,7 @@ static const struct lnet_lnd *lnet_load_lnd(u32 lnd_type)
                        libcfs_lnd2str(lnd_type),
                        libcfs_lnd2modname(lnd_type), rc);
 #ifndef HAVE_MODULE_LOADING_SUPPORT
-                       LCONSOLE_ERROR_MSG(0x104,
-                                          "Your kernel must be compiled with kernel module loading support.");
+                       LCONSOLE_ERROR("Your kernel must be compiled with kernel module loading support.");
 #endif
                        return ERR_PTR(-EINVAL);
                }