From patchwork Thu Oct 8 12:19:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pujin Shi X-Patchwork-Id: 11822813 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=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 F11E2C43467 for ; Thu, 8 Oct 2020 12:19:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9202C21D46 for ; Thu, 8 Oct 2020 12:19:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tLof7ZgI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729723AbgJHMTt (ORCPT ); Thu, 8 Oct 2020 08:19:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725802AbgJHMTt (ORCPT ); Thu, 8 Oct 2020 08:19:49 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BC5AC061755; Thu, 8 Oct 2020 05:19:47 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id x16so4153369pgj.3; Thu, 08 Oct 2020 05:19:47 -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; bh=1CA425vbWwjFQrsT0hVnTla+NVXZOa5B24PA0M3G49E=; b=tLof7ZgI51M9pwjScND+pAJ5mDdGWF+natvmIxLwwhOzE9HSBYOPdhK+8uLdVL44o5 KZL74nkU6VXqdcnPm3qE+8YT94DSHUwzVZ7FoSod+X4sFWlPugLVVMdMJYeCld1WovqU DcQJoh3HJAhSaUyxIkP1qwdoZvC5pgKNbr+hX0enXI3WfRMP/ZgBjMyKzuwA9DMqoImQ 6LOe0nNzBk/OgWXiQbMnFrPKuDsHy4V22L9Sv3Wbj6sFtOaLbqOh8VZRRyuJNjfRok8h Gup7vOBtVFSza7CC8FAFWjNEOclEXzAvyLydb3qx4k1J375twP3hATCtREETw9e9dLaV 7Rsw== 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; bh=1CA425vbWwjFQrsT0hVnTla+NVXZOa5B24PA0M3G49E=; b=CjxhNiS0OT21X75VXRNtDo8/QWrLkjJ2VazhUTXdzofNJ4TcwVI2hVWTdLzbrAiUhH 5vqvABeewVpmI5mR37kHxYy8ZF/BydejA9deGrUGILXCfSl42EStk3PCofyviE0Pj7Ew wx0/cIhXHqbmGf+35CTZ6Hr1RG4PsaMCz8kz3Kl980ty5YREYz7t98urzfJKWTxNqhkx my8jU62mj3ErYOWZmnJH8xM7Oo/j99WUe+4QfnfxDApigJHURvbNx0rNA9E95ATj/3pR bJmGOU8RrS1K4o4dD9MVJmy4H8mVLGqygEyBhYKajDZdVk8oPhEhjk4HFvUYJv3PidD6 MgdQ== X-Gm-Message-State: AOAM531wxfyq5t8MGlztorTFtMA3nTtxGp9zJlKRdNUHMftT3X4f5M5F G/YWtwP8RmvO6QsBeWy/ww== X-Google-Smtp-Source: ABdhPJwbSTQfC7Pbcdo+SQ8cZvp7bmyr47AoUrvtlbp97scUNUSAx1nvnWzjaV8hjaQj4aaFe7PluQ== X-Received: by 2002:a62:6346:0:b029:154:f822:27cf with SMTP id x67-20020a6263460000b0290154f82227cfmr7133362pfb.42.1602159586960; Thu, 08 Oct 2020 05:19:46 -0700 (PDT) Received: from localhost.localdomain ([47.242.140.181]) by smtp.gmail.com with ESMTPSA id c7sm7233914pfj.84.2020.10.08.05.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Oct 2020 05:19:46 -0700 (PDT) From: Pujin Shi To: "David S . Miller" , Jakub Kicinski Cc: Ursula Braun , Karsten Graul , linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, hankinsea@gmail.com, Pujin Shi Subject: [PATCH 1/2] net: smc: fix missing brace warning for old compilers Date: Thu, 8 Oct 2020 20:19:28 +0800 Message-Id: <20201008121929.1270-1-shipujin.t@gmail.com> X-Mailer: git-send-email 2.18.4 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org For older versions of gcc, the array = {0}; will cause warnings: net/smc/smc_llc.c: In function 'smc_llc_send_link_delete_all': net/smc/smc_llc.c:1317:9: warning: missing braces around initializer [-Wmissing-braces] struct smc_llc_msg_del_link delllc = {0}; ^ net/smc/smc_llc.c:1317:9: warning: (near initialization for 'delllc.hd') [-Wmissing-braces] 1 warnings generated Fixes: f3811fd7bc97 ("net/smc: send DELETE_LINK, ALL message and wait for send to complete") Signed-off-by: Pujin Shi Acked-by: Karsten Graul --- net/smc/smc_llc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/smc/smc_llc.c b/net/smc/smc_llc.c index 2db967f2fb50..d09d9d2d0bfd 100644 --- a/net/smc/smc_llc.c +++ b/net/smc/smc_llc.c @@ -1314,7 +1314,7 @@ static void smc_llc_process_cli_delete_link(struct smc_link_group *lgr) */ void smc_llc_send_link_delete_all(struct smc_link_group *lgr, bool ord, u32 rsn) { - struct smc_llc_msg_del_link delllc = {0}; + struct smc_llc_msg_del_link delllc = {}; int i; delllc.hd.common.type = SMC_LLC_DELETE_LINK; From patchwork Thu Oct 8 12:19:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pujin Shi X-Patchwork-Id: 11822815 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=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 6D850C04EBE for ; Thu, 8 Oct 2020 12:19:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 195BE21527 for ; Thu, 8 Oct 2020 12:19:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ah5DZbSn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729761AbgJHMT4 (ORCPT ); Thu, 8 Oct 2020 08:19:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729739AbgJHMT4 (ORCPT ); Thu, 8 Oct 2020 08:19:56 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82631C061755; Thu, 8 Oct 2020 05:19:54 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id e10so3864789pfj.1; Thu, 08 Oct 2020 05:19:54 -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:in-reply-to:references; bh=QK7x4WnMDD1w1AJigxZca0jvkUm/6wXO+3vn95iqnN0=; b=ah5DZbSny0r8zD0poMrz7u2KbugGuHbiELrKWzDy7luR9o49V1lzS7Ippkm2TDz7GD JvRELWTqlBeqQ02BgSm5dNckoFTqY5QrcbDMkPBr0E/wNgbO63Piu/9A8Xh3X3y3Y2Nz pfqiPSjXxMDUnv+9AUcHbuGLRHR5sBA+RG6Cg66KNbJiVJQPAslnxhPI3mMDJSK54056 CUV/qNslf+7yEl1+Wjtxgv6lEcyeTJ9oi4nnw0kNEuBaxoXMMK+KP+6G5Yp3bYEcjK0F d69386wwX9db+jCIr6pSByetkcpL0YWa45+phiPvoeJ10I0e+ItSydAsBX0WPHO7iRXQ FTTw== 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; bh=QK7x4WnMDD1w1AJigxZca0jvkUm/6wXO+3vn95iqnN0=; b=PGzMCyVSO9ErrXbC+9/+QekqDVHMc+R0J4+P8VDnZA0vVZCSbQCV1d3bDy1DeeKryu Bb/RpQMpU75cqtFu95M78sVNhi9c3zo7SiKenhwuJAb7gA+WmqyhiuBanarWgPS9pVnM /R/bri5V2ibXqZphYthGE2OpLpbpBX8cbwLq6NhFFBF16N1Kol/wKhwQ/L/BHs3lxYDh sDqH2PybjaoXjK2KylclodD+A9pUjh3tABWAhLpMxiFK1vhMZc+QsTJ0nixu4wGE4Rba F5PRK9V3HoAEZM6V7ksGJ4jDKC6oGE9amT1MjnVIJO3eL1SVayuaWcieFnT/pBypFQ6k 7cHA== X-Gm-Message-State: AOAM530ZcsG850wltHSUu6mLHG4YkrCZLkPsxCSwTng9Y54CiLCynNQW Q5vxqdgo4cLHdAs+UcMbFPqxKWbHH6Ag X-Google-Smtp-Source: ABdhPJy+OvvEdPcMzlBntde+cxsU2+kLyABp3rjbzeAEnj8gMImZKC8vY6ovtHlmqMTewoBcOEnXuA== X-Received: by 2002:a17:90a:bc2:: with SMTP id x2mr3876963pjd.54.1602159594117; Thu, 08 Oct 2020 05:19:54 -0700 (PDT) Received: from localhost.localdomain ([47.242.140.181]) by smtp.gmail.com with ESMTPSA id c7sm7233914pfj.84.2020.10.08.05.19.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Oct 2020 05:19:53 -0700 (PDT) From: Pujin Shi To: "David S . Miller" , Jakub Kicinski Cc: Ursula Braun , Karsten Graul , linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, hankinsea@gmail.com, Pujin Shi Subject: [PATCH 2/2] net: smc: fix missing brace warning for old compilers Date: Thu, 8 Oct 2020 20:19:29 +0800 Message-Id: <20201008121929.1270-2-shipujin.t@gmail.com> X-Mailer: git-send-email 2.18.4 In-Reply-To: <20201008121929.1270-1-shipujin.t@gmail.com> References: <20201008121929.1270-1-shipujin.t@gmail.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org For older versions of gcc, the array = {0}; will cause warnings: net/smc/smc_llc.c: In function 'smc_llc_add_link_local': net/smc/smc_llc.c:1212:9: warning: missing braces around initializer [-Wmissing-braces] struct smc_llc_msg_add_link add_llc = {0}; ^ net/smc/smc_llc.c:1212:9: warning: (near initialization for 'add_llc.hd') [-Wmissing-braces] net/smc/smc_llc.c: In function 'smc_llc_srv_delete_link_local': net/smc/smc_llc.c:1245:9: warning: missing braces around initializer [-Wmissing-braces] struct smc_llc_msg_del_link del_llc = {0}; ^ net/smc/smc_llc.c:1245:9: warning: (near initialization for 'del_llc.hd') [-Wmissing-braces] 2 warnings generated Fixes: 4dadd151b265 ("net/smc: enqueue local LLC messages") Signed-off-by: Pujin Shi Acked-by: Karsten Graul --- net/smc/smc_llc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/smc/smc_llc.c b/net/smc/smc_llc.c index d09d9d2d0bfd..85df0ef60500 100644 --- a/net/smc/smc_llc.c +++ b/net/smc/smc_llc.c @@ -1209,7 +1209,7 @@ static void smc_llc_process_srv_add_link(struct smc_link_group *lgr) /* enqueue a local add_link req to trigger a new add_link flow */ void smc_llc_add_link_local(struct smc_link *link) { - struct smc_llc_msg_add_link add_llc = {0}; + struct smc_llc_msg_add_link add_llc = {}; add_llc.hd.length = sizeof(add_llc); add_llc.hd.common.type = SMC_LLC_ADD_LINK; @@ -1242,7 +1242,7 @@ static void smc_llc_add_link_work(struct work_struct *work) */ void smc_llc_srv_delete_link_local(struct smc_link *link, u8 del_link_id) { - struct smc_llc_msg_del_link del_llc = {0}; + struct smc_llc_msg_del_link del_llc = {}; del_llc.hd.length = sizeof(del_llc); del_llc.hd.common.type = SMC_LLC_DELETE_LINK;