From patchwork Tue Jan 12 06:42:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lijun Pan X-Patchwork-Id: 361716 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BDCDC433E0 for ; Tue, 12 Jan 2021 06:44:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D5ADE22CA1 for ; Tue, 12 Jan 2021 06:44:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387836AbhALGnt (ORCPT ); Tue, 12 Jan 2021 01:43:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729325AbhALGns (ORCPT ); Tue, 12 Jan 2021 01:43:48 -0500 Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CC26C061794 for ; Mon, 11 Jan 2021 22:43:08 -0800 (PST) Received: by mail-oi1-x233.google.com with SMTP id w124so1318154oia.6 for ; Mon, 11 Jan 2021 22:43:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uxL23eYJ4/SIOr9A1JVXfRa6FfkjIQ+pQUQ2CTOgWSA=; b=pp7+93wb0N3Wouq/ikHRk24tWpavlmww7TL2QVJqG1kIIfG1ghaVJcOjdqik/uduNM 68NWv6c9G6jGjN+geSH0YgU+JSKfKh6qlmGfEXeOfefSNar5deLcKPGca+/jhxEZNn/9 di4lrG2FyQrC88nMoncph9KX/7PmI+jOoP3OppSaz7iTLixMu2/hX97DyRFfUkokLkYU TIstmkyahIWHTM7NL3kWDGMnRjpIGlhldNppzhtTZHf3CgoiKMLQQXLEFpADSwHmJznw wTyPVC8pehE88Y9bR4kwvWC085k0hkNpqYr092KpsuqRZqKI0w7v/JlOwnZEE3jkvVi9 gWEA== 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=uxL23eYJ4/SIOr9A1JVXfRa6FfkjIQ+pQUQ2CTOgWSA=; b=FB4bq8S+xTWCmZvLe2x1xgUVwxerBYJKg7bIr0SipprN5ozuQEsEyWCc3OqM0YkNqF D5M9u7mmFv6QgYeaP4/U28mhcP0pieSCF8m2J05RknvqH/N9UIaqGq1IWQBE11H/z0or H/G/8NrWqIwplzyPS6i/D6GEO6vLNgteLn/CJK9lSyTECJSBSvAypOiXdGbsLBZNIBqJ UlnNMYkq8Myq9YzwCAKYj5ElruxyJSZ43sme/DOCxqJmvvyEyuVTDAaFICcIODld5EXa m3oT4+37wF9StQohJx5MGRQaQpc+wYXJMpwkt3mqqcnrnXCWXhG5KPhp35jwnIizTdsp GWgA== X-Gm-Message-State: AOAM5306QjaHtRq2JQJrFLiRsAgwJ2dJ09z8u1DucghG+IY5YnNurTUr PFxC84KqU9RAvEJ90voKM9pcKALeRKDPOQ== X-Google-Smtp-Source: ABdhPJx189WUEQyB+r6VJQMb/W0l+EKMSNijv9HV1csSonstDqlFu7r3jUH5+PrG9Q2rb72PLXWIxA== X-Received: by 2002:aca:1006:: with SMTP id 6mr1479961oiq.159.1610433787483; Mon, 11 Jan 2021 22:43:07 -0800 (PST) Received: from pear.attlocal.net ([2600:1700:271:1a80:ddc5:e91b:d3cf:e2ba]) by smtp.gmail.com with ESMTPSA id 94sm482271otw.41.2021.01.11.22.43.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jan 2021 22:43:07 -0800 (PST) From: Lijun Pan To: netdev@vger.kernel.org Cc: Lijun Pan Subject: [PATCH net-next 1/7] ibmvnic: prefer 'unsigned long' over 'unsigned long int' Date: Tue, 12 Jan 2021 00:42:59 -0600 Message-Id: <20210112064305.31606-2-lijunp213@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210112064305.31606-1-lijunp213@gmail.com> References: <20210112064305.31606-1-lijunp213@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Fix the following checkpatch warnings: WARNING: Prefer 'unsigned long' over 'unsigned long int' as the int is unnecessary WARNING: Prefer 'long' over 'long int' as the int is unnecessary Signed-off-by: Lijun Pan --- drivers/net/ethernet/ibm/ibmvnic.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index f6d3b20a5361..d4ba5f5a2b08 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -3666,8 +3666,8 @@ static int ibmvnic_send_crq(struct ibmvnic_adapter *adapter, int rc; netdev_dbg(adapter->netdev, "Sending CRQ: %016lx %016lx\n", - (unsigned long int)cpu_to_be64(u64_crq[0]), - (unsigned long int)cpu_to_be64(u64_crq[1])); + (unsigned long)cpu_to_be64(u64_crq[0]), + (unsigned long)cpu_to_be64(u64_crq[1])); if (!adapter->crq.active && crq->generic.first != IBMVNIC_CRQ_INIT_CMD) { @@ -3894,7 +3894,7 @@ static int send_login(struct ibmvnic_adapter *adapter) netdev_dbg(adapter->netdev, "Login Buffer:\n"); for (i = 0; i < (adapter->login_buf_sz - 1) / 8 + 1; i++) { netdev_dbg(adapter->netdev, "%016lx\n", - ((unsigned long int *)(adapter->login_buf))[i]); + ((unsigned long *)(adapter->login_buf))[i]); } memset(&crq, 0, sizeof(crq)); @@ -4262,7 +4262,7 @@ static void handle_query_ip_offload_rsp(struct ibmvnic_adapter *adapter) netdev_dbg(adapter->netdev, "Query IP Offload Buffer:\n"); for (i = 0; i < (sizeof(adapter->ip_offload_buf) - 1) / 8 + 1; i++) netdev_dbg(adapter->netdev, "%016lx\n", - ((unsigned long int *)(buf))[i]); + ((unsigned long *)(buf))[i]); netdev_dbg(adapter->netdev, "ipv4_chksum = %d\n", buf->ipv4_chksum); netdev_dbg(adapter->netdev, "ipv6_chksum = %d\n", buf->ipv6_chksum); @@ -4421,7 +4421,7 @@ static void handle_request_cap_rsp(union ibmvnic_crq *crq, case PARTIALSUCCESS: dev_info(dev, "req=%lld, rsp=%ld in %s queue, retrying.\n", *req_value, - (long int)be64_to_cpu(crq->request_capability_rsp. + (long)be64_to_cpu(crq->request_capability_rsp. number), name); if (be16_to_cpu(crq->request_capability_rsp.capability) == @@ -4492,7 +4492,7 @@ static int handle_login_rsp(union ibmvnic_crq *login_rsp_crq, netdev_dbg(adapter->netdev, "Login Response Buffer:\n"); for (i = 0; i < (adapter->login_rsp_buf_sz - 1) / 8 + 1; i++) { netdev_dbg(adapter->netdev, "%016lx\n", - ((unsigned long int *)(adapter->login_rsp_buf))[i]); + ((unsigned long *)(adapter->login_rsp_buf))[i]); } /* Sanity checks */ @@ -4835,8 +4835,8 @@ static void ibmvnic_handle_crq(union ibmvnic_crq *crq, long rc; netdev_dbg(netdev, "Handling CRQ: %016lx %016lx\n", - (unsigned long int)cpu_to_be64(u64_crq[0]), - (unsigned long int)cpu_to_be64(u64_crq[1])); + (unsigned long)cpu_to_be64(u64_crq[0]), + (unsigned long)cpu_to_be64(u64_crq[1])); switch (gen_crq->first) { case IBMVNIC_CRQ_INIT_RSP: switch (gen_crq->cmd) { From patchwork Tue Jan 12 06:43:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lijun Pan X-Patchwork-Id: 362748 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A36AC433DB for ; Tue, 12 Jan 2021 06:44:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 036F522CA2 for ; Tue, 12 Jan 2021 06:44:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728072AbhALGnu (ORCPT ); Tue, 12 Jan 2021 01:43:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729059AbhALGnt (ORCPT ); Tue, 12 Jan 2021 01:43:49 -0500 Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 242CAC061795 for ; Mon, 11 Jan 2021 22:43:09 -0800 (PST) Received: by mail-ot1-x32d.google.com with SMTP id b24so1355002otj.0 for ; Mon, 11 Jan 2021 22:43:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KEypS/w+0uMzjn2mKyuYC8fEY9WmEshHRe/FDISR2Ag=; b=LYYOBYAhmUhC5AHaUX61lFK5lwxDyoDbQXYOVjKjJiAJr7PvKm4Vw1Dy0m66RH8MqQ nOHRAWfn1ZfItA2KFZg2uk85ksKY/+0fuCa155U/PSn/VDmVjJt1IOEfG2pIvG89PNVj hJtK6RJjv/sp0jqWmJCtuhb/FNF8KVPGP+RlDmK2eqyrAeyUB34M3NF2i5b0OxbOX2z0 dtkAgM8swNCYL8S86GBLOn2rZS9Rz3AzJS1csPKo/DSsN1UkOj+rV+PZSxYFURDXNPD9 3CpRIx9dTfle30w+ENZmiEmHmXZVlqxVcq2LhOzs86/jm9Kek018PlkmfA5SnI5F8D2S oDtw== 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=KEypS/w+0uMzjn2mKyuYC8fEY9WmEshHRe/FDISR2Ag=; b=bVh831fQyO0ua1ZpavN7weAEZK+qiOlW4eoOzmBjY6zjKChRCPr1Ih/BCDfC83oTwY hDuz0/4PQC+uCqVnBVaTcsN4NCwj2fyyjTFlD7ca0cgUyY5dK83JuEdBHkeKbNGokZlJ h5PUs1fdM+S+wVBX3G38vg+AWzyRJ+SKNOAPGaosE5zwmfA7x0Q9UCN1NnNJ8MjeB/pJ yHvdk5IRsvSDPBRNd90z4wYv2HdSSw4RQ6XCANDjF6Ab4c9V9vMTKVeMPmq/4cPiPxBW EuRLTB3iQxodscWmNwSPFHzT1WbmeBEAP2bLhi82ennvV0I1khG4b6DtfvE0GJ8TMreP C2YA== X-Gm-Message-State: AOAM530l+U/RO78VoTe1X8elMagO4J5kA3VyoU/oH5WH1zz1z8Ig4vaE Widn8IPJ3le1F1bzbCG+H/nxTlOthVOs7Q== X-Google-Smtp-Source: ABdhPJxQLTvGB5PMxF7QtUehpxobWANeRuk5+Ir2mSFVuZLshztAEx5vfoHBwL8gX1NP+kUUEpVVng== X-Received: by 2002:a9d:4793:: with SMTP id b19mr1831089otf.193.1610433788396; Mon, 11 Jan 2021 22:43:08 -0800 (PST) Received: from pear.attlocal.net ([2600:1700:271:1a80:ddc5:e91b:d3cf:e2ba]) by smtp.gmail.com with ESMTPSA id 94sm482271otw.41.2021.01.11.22.43.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jan 2021 22:43:08 -0800 (PST) From: Lijun Pan To: netdev@vger.kernel.org Cc: Lijun Pan Subject: [PATCH net-next 2/7] ibmvnic: fix block comments Date: Tue, 12 Jan 2021 00:43:00 -0600 Message-Id: <20210112064305.31606-3-lijunp213@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210112064305.31606-1-lijunp213@gmail.com> References: <20210112064305.31606-1-lijunp213@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Fix the following checkpatch warning: WARNING: networking block comments don't use an empty /* line, use /* Comment... Signed-off-by: Lijun Pan --- drivers/net/ethernet/ibm/ibmvnic.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index d4ba5f5a2b08..fe08c5415b9e 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -1220,8 +1220,7 @@ static int ibmvnic_open(struct net_device *netdev) rc = __ibmvnic_open(netdev); out: - /* - * If open fails due to a pending failover, set device state and + /* If open fails due to a pending failover, set device state and * return. Device operation will be handled by reset routine. */ if (rc && adapter->failover_pending) { @@ -1946,8 +1945,7 @@ static int do_reset(struct ibmvnic_adapter *adapter, if (!(adapter->reset_reason == VNIC_RESET_CHANGE_PARAM)) rtnl_lock(); - /* - * Now that we have the rtnl lock, clear any pending failover. + /* Now that we have the rtnl lock, clear any pending failover. * This will ensure ibmvnic_open() has either completed or will * block until failover is complete. */ @@ -2249,8 +2247,7 @@ static void __ibmvnic_reset(struct work_struct *work) spin_unlock_irqrestore(&adapter->state_lock, flags); if (adapter->force_reset_recovery) { - /* - * Since we are doing a hard reset now, clear the + /* Since we are doing a hard reset now, clear the * failover_pending flag so we don't ignore any * future MOBILITY or other resets. */ @@ -2323,8 +2320,7 @@ static int ibmvnic_reset(struct ibmvnic_adapter *adapter, unsigned long flags; int ret; - /* - * If failover is pending don't schedule any other reset. + /* If failover is pending don't schedule any other reset. * Instead let the failover complete. If there is already a * a failover reset scheduled, we will detect and drop the * duplicate reset when walking the ->rwi_list below. From patchwork Tue Jan 12 06:43:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lijun Pan X-Patchwork-Id: 361715 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63974C433E9 for ; Tue, 12 Jan 2021 06:44:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 246A622CAD for ; Tue, 12 Jan 2021 06:44:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387866AbhALGnu (ORCPT ); Tue, 12 Jan 2021 01:43:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387756AbhALGnu (ORCPT ); Tue, 12 Jan 2021 01:43:50 -0500 Received: from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1267C06179F for ; Mon, 11 Jan 2021 22:43:09 -0800 (PST) Received: by mail-oo1-xc2c.google.com with SMTP id q6so351576ooo.8 for ; Mon, 11 Jan 2021 22:43:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=o4Xmc9wfwqZ8rH9tMXF4rzLE1R2SsM9VUBBGWoN0w4A=; b=r62LVyqxKCRurNsd/AUxSdLLuxtOjw4z0hzQMOh6yhgHK0h6ry8HGusCj3eGwBc4Hw DdnPBirQf6HvhONDGYbqAHa3EhaIaPCUks/01eJ8HTQiT9Ba/NE64Z5chfHVgym3HNAD vVQ9iUOK0Cxm2YSHiJ2cRtCfCZdZthBf5Zis6o9z478hOU5iF3lLjLqXGifRJybffgr0 qD3gEQvZyZ5LE+wIyVpoLGtVnJBMcQwRVE3lZpvh+Bw5mKb13IXShXEH3PI1tQyH0KgK mcnOVyUUNy3p4xyqVh+1MLotes6EF9GUgLo/0jU20KovTCDFQTTWxRNbGXga7FZzYnhi hW+Q== 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=o4Xmc9wfwqZ8rH9tMXF4rzLE1R2SsM9VUBBGWoN0w4A=; b=YzXWLIq0B6eMc9l6hLVgSg2bWRQyxZYAtUaQQVDockRHlThvv16/kOex5eLH3pistv s7MzgHimNFul+aMytqj6+js+kkZ8+gxseM6c7koi2519a6yGYCR5OvzM1ZZDnTpx99GX vFPqjeJ7RAjLlTG6elDstsRCpoYP1YxRLwuk24DdKJZxYG46g3wPPFsAhOmg8L8554B9 rRrt2Y9aw2FLG7to6C0dLZqYk32t2gfgXQ8sQWN7qx0HlOhmG1elBXtjRENttZP9cadp A9grQafBCk46h22A3lT9P5Z3Nu8GJrCaW/j0JHQn8RGOsPLJ46wR2Hm2oRFhk79c+pQS dBaw== X-Gm-Message-State: AOAM533+jsO4CptINbxt5N5+KskrNxi4ZzNx7yUOUMa5qz9OxOEB20zu izNp9polq402YXeUJgCGGhJS7Kbr3/Y6kw== X-Google-Smtp-Source: ABdhPJzegDNxamqARdi3lfbnFuj8YLN3GUQYP2uVjcPG548cUGzZzpMZJalKfmPnOw41HGl70QU09A== X-Received: by 2002:a4a:d197:: with SMTP id j23mr1912106oor.19.1610433789274; Mon, 11 Jan 2021 22:43:09 -0800 (PST) Received: from pear.attlocal.net ([2600:1700:271:1a80:ddc5:e91b:d3cf:e2ba]) by smtp.gmail.com with ESMTPSA id 94sm482271otw.41.2021.01.11.22.43.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jan 2021 22:43:09 -0800 (PST) From: Lijun Pan To: netdev@vger.kernel.org Cc: Lijun Pan Subject: [PATCH net-next 3/7] ibmvnic: fix braces Date: Tue, 12 Jan 2021 00:43:01 -0600 Message-Id: <20210112064305.31606-4-lijunp213@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210112064305.31606-1-lijunp213@gmail.com> References: <20210112064305.31606-1-lijunp213@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Fix the following checkpatch warning: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Lijun Pan --- drivers/net/ethernet/ibm/ibmvnic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index fe08c5415b9e..eb3ab0e6156f 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -2040,9 +2040,8 @@ static int do_reset(struct ibmvnic_adapter *adapter, } rc = ibmvnic_login(netdev); - if (rc) { + if (rc) goto out; - } if (adapter->reset_reason == VNIC_RESET_CHANGE_PARAM) { rc = init_resources(adapter); From patchwork Tue Jan 12 06:43:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lijun Pan X-Patchwork-Id: 362747 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FA5AC433E6 for ; Tue, 12 Jan 2021 06:44:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 470E022CA1 for ; Tue, 12 Jan 2021 06:44:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387894AbhALGnw (ORCPT ); Tue, 12 Jan 2021 01:43:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387756AbhALGnu (ORCPT ); Tue, 12 Jan 2021 01:43:50 -0500 Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E8F4C0617A2 for ; Mon, 11 Jan 2021 22:43:10 -0800 (PST) Received: by mail-oi1-x232.google.com with SMTP id x13so1327091oic.5 for ; Mon, 11 Jan 2021 22:43:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nFkfyhtA/p6JxBeO3XIMrxsFQEkcBYrraZE4qffCy84=; b=rBuH3viQRqXQdNchiP0UZZv9ePfmomwGqFxUVwkyZOko22stO4dPdsu9GTKsUR9ioS iLJCzG08ka0dmw0x1FoezulJYd/U3TtYLRTVh5TsKVrY1R/GDWARg4sdXGExOklIUR9o 32so3DVmyj6vOx9ZEc5EXVju3MyARuVloKH8rZy1MqVcNAYauhFo6tPCbQQ8zmQNfaUh Jdv54z4FnK6BTFuY2Jpm1w8/Odfj3wUVe0bpXLJ+4g7Z6cKdW0PrIkkPnxkPwLFzEZuV AKnGQa+gllan+rrBV2E7xDeSmz/UnRjLw8aeScwPv15UW+fnKCUI5S4x1GOcC+WGXLMG ThdA== 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=nFkfyhtA/p6JxBeO3XIMrxsFQEkcBYrraZE4qffCy84=; b=rsz8KbgxweBAWdDbxc/t8cmCo57KD9WRaH9gfn8Jo5CSbgLcYM8DHivP4YnLQnooJH +qI7SUipxYSAb8ivoxkSOyaQvKyH/pGQE0GnzlEeXXqECqpHrZ0mAbQuNnIrFIx/k4J8 0S9f119P0uLLALQEW7GaSSSSCpMx8FJbn05WTM/tuXMRM7QtwwO1I94+zQSsOuWAbani HB0TWDNTZAUq47K+rznhkqONPCLAl4tS/y2VjIc9K2rh0qALczKl/ICx+8K3SmTgp55F JhOXpgnYVp5PpgrgNQw31ixwl0Kzbfeka9QG2Lr6fRtUpUUXl5zqDsMwgRZwUZlou6AH E5Uw== X-Gm-Message-State: AOAM533hcuc3wbWpUtm663MI34UM+ARuDQVXwQJsbjt3bXP3NTmzFzDt VR8ubyHP8qmOhqcyodo2YLCFGY3ijBC4AA== X-Google-Smtp-Source: ABdhPJzVIVOuheKA3/icRsLkwl6EUkq/f2yCjDkf3skaVyHAa0C1urqojA9UdP/1A9fyJJySG6InEg== X-Received: by 2002:aca:5196:: with SMTP id f144mr1206954oib.51.1610433789939; Mon, 11 Jan 2021 22:43:09 -0800 (PST) Received: from pear.attlocal.net ([2600:1700:271:1a80:ddc5:e91b:d3cf:e2ba]) by smtp.gmail.com with ESMTPSA id 94sm482271otw.41.2021.01.11.22.43.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jan 2021 22:43:09 -0800 (PST) From: Lijun Pan To: netdev@vger.kernel.org Cc: Lijun Pan Subject: [PATCH net-next 4/7] ibmvnic: avoid multiple line dereference Date: Tue, 12 Jan 2021 00:43:02 -0600 Message-Id: <20210112064305.31606-5-lijunp213@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210112064305.31606-1-lijunp213@gmail.com> References: <20210112064305.31606-1-lijunp213@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Fix the following checkpatch warning: WARNING: Avoid multiple line dereference Signed-off-by: Lijun Pan --- drivers/net/ethernet/ibm/ibmvnic.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index eb3ab0e6156f..30add8a8a3dc 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -2447,9 +2447,8 @@ static int ibmvnic_poll(struct napi_struct *napi, int budget) */ dma_rmb(); next = ibmvnic_next_scrq(adapter, rx_scrq); - rx_buff = - (struct ibmvnic_rx_buff *)be64_to_cpu(next-> - rx_comp.correlator); + rx_buff = (struct ibmvnic_rx_buff *) + be64_to_cpu(next->rx_comp.correlator); /* do error checking */ if (next->rx_comp.rc) { netdev_dbg(netdev, "rx buffer returned with rc %x\n", @@ -3865,15 +3864,15 @@ static int send_login(struct ibmvnic_adapter *adapter) for (i = 0; i < adapter->req_tx_queues; i++) { if (adapter->tx_scrq[i]) { - tx_list_p[i] = cpu_to_be64(adapter->tx_scrq[i]-> - crq_num); + tx_list_p[i] = + cpu_to_be64(adapter->tx_scrq[i]->crq_num); } } for (i = 0; i < adapter->req_rx_queues; i++) { if (adapter->rx_scrq[i]) { - rx_list_p[i] = cpu_to_be64(adapter->rx_scrq[i]-> - crq_num); + rx_list_p[i] = + cpu_to_be64(adapter->rx_scrq[i]->crq_num); } } @@ -4416,8 +4415,8 @@ static void handle_request_cap_rsp(union ibmvnic_crq *crq, case PARTIALSUCCESS: dev_info(dev, "req=%lld, rsp=%ld in %s queue, retrying.\n", *req_value, - (long)be64_to_cpu(crq->request_capability_rsp. - number), name); + (long)be64_to_cpu(crq->request_capability_rsp.number), + name); if (be16_to_cpu(crq->request_capability_rsp.capability) == REQ_MTU) { From patchwork Tue Jan 12 06:43:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lijun Pan X-Patchwork-Id: 362746 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 941CEC43381 for ; Tue, 12 Jan 2021 06:44:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 68F7022CA2 for ; Tue, 12 Jan 2021 06:44:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388000AbhALGoG (ORCPT ); Tue, 12 Jan 2021 01:44:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728321AbhALGoF (ORCPT ); Tue, 12 Jan 2021 01:44:05 -0500 Received: from mail-oo1-xc2f.google.com (mail-oo1-xc2f.google.com [IPv6:2607:f8b0:4864:20::c2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EF70C0617A3 for ; Mon, 11 Jan 2021 22:43:11 -0800 (PST) Received: by mail-oo1-xc2f.google.com with SMTP id j21so347606oou.11 for ; Mon, 11 Jan 2021 22:43:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qw6Igr8pEEQb3qYloEDGppg1SJg0zQ2daP9uTVnsJIg=; b=T37ce+zcFyKUHQPLvRHnxh38J++tjRrnAJzzmm8Jh1K4Z/SAoYD/yZYpSGhRP8NPbb eW1ajZmGsZVwBAr6LW6z+jcRQN7Fl5QUhEFUAA6R7mJoq8AG/DUy9reRmDdBGdEG2I5c NQv9rcjSu/PJh689HkriVIBODAfBI8meWard88PaR1z/IVoZ/KSq/t9jPEzdkl9lJ/4S OaXxtN6+TCk7LToOIn5asxKjz/Fva0pbPt5/sH7+Vk9t9I1iC6MIqlMpIELKo4iq3cyb n3L4bSfCGhHES93QkFynTySzsYA2GvSDOIkIie2ZV3rAXHHRmUhGIvyJhcmBc4f3BU1Q wpTQ== 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=qw6Igr8pEEQb3qYloEDGppg1SJg0zQ2daP9uTVnsJIg=; b=garwcLab6BVCgzQcCW5WC4Yi4voXsGsTnlXGvKe/ko3CiXULY5s+AE1MUh34DC8sYe W25h0WJOOavF3teuh1d7jvG1RnZaPQbTqdQVe96qTq+OQHgpiSTMn+E8jhxUNvUwWi7I yWQwfjwqgx7yJ3AE09NWuWj6bx0HYvK+Xmt4E5vs0sPNWPpX67DwR0kTRRDqcAYKGnQC +vCduiw+ezYFp1EUThr+f9IMQFeC8MGSd7RUyFEcyuK+HVlOqR6oMzSuy19tkcKi9dAp LIp6rvwIuKVUpIKG26/C1F6qfzI0SbmyKR0SJYwnv3ZSrwEgNoFWwiBQ2vFDnHXfi+QC LcUA== X-Gm-Message-State: AOAM531+44K4rDKxlbDFF0KuZqyKPhFvycZ27UkoCqqOUGu9EXYDHKTS P+YGCOkPzwY25ERJCw+VE9qKeue+Dbu4kw== X-Google-Smtp-Source: ABdhPJxj9AYx+S6v25tV8sjlPEbE5IIrEuBzIVVzuci5hf3+EL0ylPwwJpJgkOyYgBQjcX66Fdh/yg== X-Received: by 2002:a4a:d4cd:: with SMTP id r13mr1899573oos.35.1610433790567; Mon, 11 Jan 2021 22:43:10 -0800 (PST) Received: from pear.attlocal.net ([2600:1700:271:1a80:ddc5:e91b:d3cf:e2ba]) by smtp.gmail.com with ESMTPSA id 94sm482271otw.41.2021.01.11.22.43.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jan 2021 22:43:10 -0800 (PST) From: Lijun Pan To: netdev@vger.kernel.org Cc: Lijun Pan Subject: [PATCH net-next 5/7] ibmvnic: fix miscellaneous checks Date: Tue, 12 Jan 2021 00:43:03 -0600 Message-Id: <20210112064305.31606-6-lijunp213@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210112064305.31606-1-lijunp213@gmail.com> References: <20210112064305.31606-1-lijunp213@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Fix the following checkpatch checks: CHECK: Macro argument 'off' may be better as '(off)' to avoid precedence issues CHECK: Alignment should match open parenthesis CHECK: multiple assignments should be avoided CHECK: Blank lines aren't necessary before a close brace '}' CHECK: Please use a blank line after function/struct/union/enum declarations CHECK: Unnecessary parentheses around 'rc != H_FUNCTION' Signed-off-by: Lijun Pan --- drivers/net/ethernet/ibm/ibmvnic.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 30add8a8a3dc..f9db139f652b 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -115,7 +115,7 @@ struct ibmvnic_stat { #define IBMVNIC_STAT_OFF(stat) (offsetof(struct ibmvnic_adapter, stats) + \ offsetof(struct ibmvnic_statistics, stat)) -#define IBMVNIC_GET_STAT(a, off) (*((u64 *)(((unsigned long)(a)) + off))) +#define IBMVNIC_GET_STAT(a, off) (*((u64 *)(((unsigned long)(a)) + (off)))) static const struct ibmvnic_stat ibmvnic_stats[] = { {"rx_packets", IBMVNIC_STAT_OFF(rx_packets)}, @@ -2069,14 +2069,14 @@ static int do_reset(struct ibmvnic_adapter *adapter, rc = reset_tx_pools(adapter); if (rc) { netdev_dbg(adapter->netdev, "reset tx pools failed (%d)\n", - rc); + rc); goto out; } rc = reset_rx_pools(adapter); if (rc) { netdev_dbg(adapter->netdev, "reset rx pools failed (%d)\n", - rc); + rc); goto out; } } @@ -2334,7 +2334,8 @@ static int ibmvnic_reset(struct ibmvnic_adapter *adapter, if (adapter->state == VNIC_PROBING) { netdev_warn(netdev, "Adapter reset during probe\n"); - ret = adapter->init_done_rc = EAGAIN; + adapter->init_done_rc = EAGAIN; + ret = EAGAIN; goto err; } @@ -2754,7 +2755,6 @@ static int ibmvnic_set_channels(struct net_device *netdev, channels->rx_count, channels->tx_count, adapter->req_rx_queues, adapter->req_tx_queues); return ret; - } static void ibmvnic_get_strings(struct net_device *dev, u32 stringset, u8 *data) @@ -2843,8 +2843,8 @@ static void ibmvnic_get_ethtool_stats(struct net_device *dev, return; for (i = 0; i < ARRAY_SIZE(ibmvnic_stats); i++) - data[i] = be64_to_cpu(IBMVNIC_GET_STAT(adapter, - ibmvnic_stats[i].offset)); + data[i] = be64_to_cpu(IBMVNIC_GET_STAT + (adapter, ibmvnic_stats[i].offset)); for (j = 0; j < adapter->req_tx_queues; j++) { data[i] = adapter->tx_stats_buffers[j].packets; @@ -2884,6 +2884,7 @@ static int ibmvnic_set_priv_flags(struct net_device *netdev, u32 flags) return 0; } + static const struct ethtool_ops ibmvnic_ethtool_ops = { .get_drvinfo = ibmvnic_get_drvinfo, .get_msglevel = ibmvnic_get_msglevel, @@ -3155,7 +3156,7 @@ static int enable_scrq_irq(struct ibmvnic_adapter *adapter, /* H_EOI would fail with rc = H_FUNCTION when running * in XIVE mode which is expected, but not an error. */ - if (rc && (rc != H_FUNCTION)) + if (rc && rc != H_FUNCTION) dev_err(dev, "H_EOI FAILED irq 0x%llx. rc=%ld\n", val, rc); } From patchwork Tue Jan 12 06:43:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lijun Pan X-Patchwork-Id: 361714 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B82D5C4332B for ; Tue, 12 Jan 2021 06:44:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8D49322CA1 for ; Tue, 12 Jan 2021 06:44:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387970AbhALGoG (ORCPT ); Tue, 12 Jan 2021 01:44:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729230AbhALGoF (ORCPT ); Tue, 12 Jan 2021 01:44:05 -0500 Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D74FC0617A4 for ; Mon, 11 Jan 2021 22:43:12 -0800 (PST) Received: by mail-oi1-x234.google.com with SMTP id x13so1327147oic.5 for ; Mon, 11 Jan 2021 22:43:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xEeL2AfSTftv2OyiQ5Edzj9Z8sExSgX4UezpDOpi5PE=; b=TPPyLAUL+IQtoD6dFXSPCthl9lSdOd41rzTQx+7P0EK8JvWS1opHQq8yVruBTxvXxT 7cpCWkZy9JkNhdbtmY4aOY3OrmNk3b9/e3cVrqH2x4Surk55eCllin1a0FxfmqGu1u2V fuSGfkdRBytqJizCYXtF913RY/zUbvvJULcUvTIW0Topg3z2/DpzCsVKqoRXZZIcDzox r2nd2zFqYN3pUVwxpQq0oN1hQaMkbA2M+bZ34SxyVeOoIqIhyE8MPGAEaEMgOh2JqnxZ 0zKwpvXb7HHdwbJP+n2ovkC29Av2CaWsDbJcHdhyeE0lb2fGV9qVTKrMRXYsrpzy5bUM lVXQ== 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=xEeL2AfSTftv2OyiQ5Edzj9Z8sExSgX4UezpDOpi5PE=; b=CGVF7Q3Ty77kbNg+RntlbbAJfgJI7qGPqv/blv2sqgHjCHGW/gE3zTzuvmzHOjfx07 fM7lg9OMs6YybcJL1otPkN9OFkFg1+YLAa3McfNEQS2Y2HayQcZTeAHtUCIcnQ1XWVNi V7RJ9Yu+D5jcGoAsTH4cFS35emk4mBIWJn/uPM7RkFFyB7cus9OC27rSzg19lvZBXn+7 PTH0S9MaaZ6TSn8FqNFy/lfbwg0VYTM/99rNvpPJMYONroV5qhanNtnyfVUNoqpiKpTW cK+lFyREVkZagZscWtQmc2yLp1zSPhRvVWFVcge08rW/5hCVGobeLbOp3e2II92uEzkC 07Sw== X-Gm-Message-State: AOAM531gxCD1x10W5ssZVJNtO+y6QcjuqlvBTeJz33mUcgHfX5jRH+bS hEm/ugejKYipL9HoBdLpLzeKgyB8PRiRyw== X-Google-Smtp-Source: ABdhPJxtS8IPAY7Qf7Tw4edgow+SLXoOAgpHRt8Q5BsOcVbzUq5wkja9zKQL79c0V7taCF/qlx8u2g== X-Received: by 2002:aca:ebd0:: with SMTP id j199mr1504316oih.155.1610433791442; Mon, 11 Jan 2021 22:43:11 -0800 (PST) Received: from pear.attlocal.net ([2600:1700:271:1a80:ddc5:e91b:d3cf:e2ba]) by smtp.gmail.com with ESMTPSA id 94sm482271otw.41.2021.01.11.22.43.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jan 2021 22:43:11 -0800 (PST) From: Lijun Pan To: netdev@vger.kernel.org Cc: Lijun Pan Subject: [PATCH net-next 6/7] ibmvnic: add comments for spinlock_t definitions Date: Tue, 12 Jan 2021 00:43:04 -0600 Message-Id: <20210112064305.31606-7-lijunp213@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210112064305.31606-1-lijunp213@gmail.com> References: <20210112064305.31606-1-lijunp213@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org There are several spinlock_t definitions without comments. Add them. Signed-off-by: Lijun Pan --- drivers/net/ethernet/ibm/ibmvnic.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.h b/drivers/net/ethernet/ibm/ibmvnic.h index c09c3f6bba9f..8f73a30a7593 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.h +++ b/drivers/net/ethernet/ibm/ibmvnic.h @@ -845,6 +845,7 @@ struct ibmvnic_crq_queue { union ibmvnic_crq *msgs; int size, cur; dma_addr_t msg_token; + /* Used for serialization of msgs, cur */ spinlock_t lock; bool active; char name[32]; @@ -876,6 +877,7 @@ struct ibmvnic_sub_crq_queue { unsigned int irq; unsigned int pool_index; int scrq_num; + /* Used for serialization of msgs, cur */ spinlock_t lock; struct sk_buff *rx_skb_top; struct ibmvnic_adapter *adapter; @@ -1080,9 +1082,12 @@ struct ibmvnic_adapter { struct tasklet_struct tasklet; enum vnic_state state; + /* Used for serializatin of state field */ + spinlock_t state_lock; enum ibmvnic_reset_reason reset_reason; - spinlock_t rwi_lock; struct list_head rwi_list; + /* Used for serialization of rwi_list */ + spinlock_t rwi_lock; struct work_struct ibmvnic_reset; struct delayed_work ibmvnic_delayed_reset; unsigned long resetting; @@ -1096,7 +1101,4 @@ struct ibmvnic_adapter { struct ibmvnic_tunables desired; struct ibmvnic_tunables fallback; - - /* Used for serializatin of state field */ - spinlock_t state_lock; }; From patchwork Tue Jan 12 06:43:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lijun Pan X-Patchwork-Id: 362745 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57451C433DB for ; Tue, 12 Jan 2021 06:44:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 198FA223E8 for ; Tue, 12 Jan 2021 06:44:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388028AbhALGo2 (ORCPT ); Tue, 12 Jan 2021 01:44:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730465AbhALGo2 (ORCPT ); Tue, 12 Jan 2021 01:44:28 -0500 Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E355C0617A5 for ; Mon, 11 Jan 2021 22:43:13 -0800 (PST) Received: by mail-oi1-x22d.google.com with SMTP id s2so1341531oij.2 for ; Mon, 11 Jan 2021 22:43:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QqIzdhe3bhm33+yVgUH0Jf6yGbzv8srwAYIGVy2K0RE=; b=Quk4cQ9RkrI7Oe1veKtD8KL/u7IPowIPAVoh//UYxMd2oSIgLSzEHRQRrhFRVoC5nb FaUM8PYZbTuASMHa2jeBf4rYMrjhxoWdQyhJ13Ucg9rDnoet8yQHdpiz3GCislZ4uBYc Cky1SoMbUgXjZF2dY07cr0QqmGnhWxWSbKwiADUFTerqwQyWs8Lefw85LY8sBD7DJeu0 XRshf44dqOaf+UMKIarbnkO7ZdK4gIZM0MaH6LSrfCTbPoTWjz+c3tEdh4d0rJp9J1zF zQuAwWzUSEaNoy3VbjQ4I3Fbm3EJhYW6CY/iqS7SxDCXGAoPPGC4XMc3JZgNmsOCDK0Q RPdA== 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=QqIzdhe3bhm33+yVgUH0Jf6yGbzv8srwAYIGVy2K0RE=; b=gFr/rCi9zBouCZ1PEiVefmlIzPEwnoSRlyeMjyk/y+PZ1lOZ/QD1wlAK6uoJ7/MHSs CnowT/zNWdQ6SkYam0kabhZsQeR3JwueBrmGd3eAGQhfVGDpBgMcj5FcFOYnNAKtNxzV gCFA2qNwRgSSOc2kSGdE95fNtlrEG8SVUMGFVSEJpQNHNaRGz1isP8WG/lf4MwWas8nz fpOlj5bDdykLSbYmr6k0ekMUWeydaVD3kpAL8oMhkUfdYJybFoKijnYpmo7JRIT7SE6F KauQGJ2v8tdkPl1hpevhDaBo0rosRG3LvI/A8HODJPSJbAvv1e9kSq3DA7ideplz3P2c 0IHA== X-Gm-Message-State: AOAM532y9YetK+kS8IJpVInG8oXNXlaG+5pq0hxrO+FTvX39L/8Hmj4Y hFdNoOqKhnO5iPwKBNwo+AiDg4/Ii6NN4w== X-Google-Smtp-Source: ABdhPJwBKOl24shC3HQkEbCwmwAgibP4bIaCWZxrHzKkFSDOI87dGiA491igDbaHdg/+cuKVl2vhlg== X-Received: by 2002:a05:6808:352:: with SMTP id j18mr1566175oie.78.1610433792383; Mon, 11 Jan 2021 22:43:12 -0800 (PST) Received: from pear.attlocal.net ([2600:1700:271:1a80:ddc5:e91b:d3cf:e2ba]) by smtp.gmail.com with ESMTPSA id 94sm482271otw.41.2021.01.11.22.43.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jan 2021 22:43:12 -0800 (PST) From: Lijun Pan To: netdev@vger.kernel.org Cc: Lijun Pan Subject: [PATCH net-next 7/7] ibmvnic: remove unused spinlock_t stats_lock definition Date: Tue, 12 Jan 2021 00:43:05 -0600 Message-Id: <20210112064305.31606-8-lijunp213@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210112064305.31606-1-lijunp213@gmail.com> References: <20210112064305.31606-1-lijunp213@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org stats_lock is no longer used. So remove it. Signed-off-by: Lijun Pan --- drivers/net/ethernet/ibm/ibmvnic.c | 2 -- drivers/net/ethernet/ibm/ibmvnic.h | 1 - 2 files changed, 3 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index f9db139f652b..d76d9934c7c3 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -5284,8 +5284,6 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id) netdev->ethtool_ops = &ibmvnic_ethtool_ops; SET_NETDEV_DEV(netdev, &dev->dev); - spin_lock_init(&adapter->stats_lock); - INIT_WORK(&adapter->ibmvnic_reset, __ibmvnic_reset); INIT_DELAYED_WORK(&adapter->ibmvnic_delayed_reset, __ibmvnic_delayed_reset); diff --git a/drivers/net/ethernet/ibm/ibmvnic.h b/drivers/net/ethernet/ibm/ibmvnic.h index 8f73a30a7593..270d1cac86a4 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.h +++ b/drivers/net/ethernet/ibm/ibmvnic.h @@ -987,7 +987,6 @@ struct ibmvnic_adapter { struct ibmvnic_statistics stats; dma_addr_t stats_token; struct completion stats_done; - spinlock_t stats_lock; int replenish_no_mem; int replenish_add_buff_success; int replenish_add_buff_failure;