From mboxrd@z Thu Jan 1 00:00:00 1970 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_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 6DE35C43464 for ; Mon, 13 Jul 2020 13:23:10 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3FDDF20773 for ; Mon, 13 Jul 2020 13:23:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GfVbLOBw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3FDDF20773 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-kernel-mentees-bounces@lists.linuxfoundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 274CE88B48; Mon, 13 Jul 2020 13:23:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w+5BqgH48ZTO; Mon, 13 Jul 2020 13:23:09 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 7EC6C88AEF; Mon, 13 Jul 2020 13:23:09 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7BE3FC0888; Mon, 13 Jul 2020 13:23:09 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6B2C7C08A6 for ; Mon, 13 Jul 2020 13:23:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 4E32A2002A for ; Mon, 13 Jul 2020 13:23:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GvJ0zrY71V8X for ; Mon, 13 Jul 2020 13:23:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ed1-f66.google.com (mail-ed1-f66.google.com [209.85.208.66]) by silver.osuosl.org (Postfix) with ESMTPS id 3C9612288E for ; Mon, 13 Jul 2020 13:23:07 +0000 (UTC) Received: by mail-ed1-f66.google.com with SMTP id b15so13648169edy.7 for ; Mon, 13 Jul 2020 06:23:07 -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=1igF4d0BlRch6oTsOMsklRo2hJykPi64NTGjSwxBH2w=; b=GfVbLOBwTQM68ys28gmEsLzbrBK1b+c6gCAsHBPLuU1sBU4FxzUQzy/FNV+5JwZOZm kR1VcVfpphRXsdfwIXVx0TAIiRR2ezTv5Ddtc5q6AGYct5hmINAtuH2sc4z+kABGsA3q MZpWVLyzERoP5ZgKwWxgZ/Bwb6KkGfAYQ9yYfsAF7q7g9s64zC4q4x7y4lMUurO7OOP+ GRtkarmdVJUSPnTc67hb7A1PCAolXIJeajY5fisQ/pGpWykWJ6NKryHtSJ+mG/rXcimM ZkVft5Cj3VHZrbAZSjJNYb5UM7QM1G0i5UELVPbI1106MfxiHosmC6D9IGT7Iu7SHFu8 L03A== 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=1igF4d0BlRch6oTsOMsklRo2hJykPi64NTGjSwxBH2w=; b=En5EkzQvXelzKfoJzArURuPvhyKiY2I9rxSkVeKWRQ7NMOz2EQwoKePCDr3RIqNDPS O4IiTXYBwnEAhRRRnS5I6PjR+I2j7F4Q8pVTjfnFljOfwvwuaKnRO/vGjXEdcO1hXdIA lyhYKZGlOjXrkHtSg5O5NxylScJL3N9rQva4Z87Sn2uhAU3iZZBsOj+sW4nLUXRTmdot 7MJyZjlFpjEIzfkREhtC+gHzk0L65R4RbTcsXTMtqc+yNPpbuFuEJL51tvw7gPodU+9M 7C/4gzxM2NLP8SUk9kmW1LK0wAxZmxe4KD0G2Uor16Kh8aMwkGyOxo/nKVijI3bQbLCo qaUA== X-Gm-Message-State: AOAM533myopijdOQNa06gYvAAPCnUh0vcRIAEF0k0FXCsxupViBSeFR9 uzv3QZ8crFIMmFvUBGmAuWg= X-Google-Smtp-Source: ABdhPJxLeJeo/pnR11earKOB22YmNVCGTeYK935Hvqyg5TcDWyXANgwsI03EL03zM4adEjgBZ464zw== X-Received: by 2002:a50:f392:: with SMTP id g18mr67987969edm.151.1594646585767; Mon, 13 Jul 2020 06:23:05 -0700 (PDT) Received: from net.saheed (54007186.dsl.pool.telekom.hu. [84.0.113.134]) by smtp.gmail.com with ESMTPSA id n9sm11806540edr.46.2020.07.13.06.23.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 06:23:05 -0700 (PDT) From: "Saheed O. Bolarinwa" To: helgaas@kernel.org, Chas Williams <3chas3@gmail.com> Date: Mon, 13 Jul 2020 14:22:33 +0200 Message-Id: <20200713122247.10985-22-refactormyself@gmail.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20200713122247.10985-1-refactormyself@gmail.com> References: <20200713122247.10985-1-refactormyself@gmail.com> Cc: linux-atm-general@lists.sourceforge.net, "Saheed O. Bolarinwa" , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org Subject: [Linux-kernel-mentees] [RFC PATCH 21/35] atm: Fix Style ERROR- assignment in if condition X-BeenThere: linux-kernel-mentees@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-kernel-mentees-bounces@lists.linuxfoundation.org Sender: "Linux-kernel-mentees" Move assignment out of the if condition Fix style issues in the for-loop Signed-off-by: "Saheed O. Bolarinwa" --- This patch depends on PATCH 20/35 drivers/atm/iphase.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index 2c75b82b4e7f..584d9be5fa73 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c @@ -2294,13 +2294,19 @@ static int reset_sar(struct atm_dev *dev) unsigned int pci[64]; iadev = INPH_IA_DEV(dev); - for(i=0; i<64; i++) - if ((error = pci_read_config_dword(iadev->pci, i*4, &pci[i]))) + for (i = 0; i < 64; i++) { + error = pci_read_config_dword(iadev->pci, i*4, &pci[i]); + if (error) return error; + } + writel(0, iadev->reg+IPHASE5575_EXT_RESET); - for(i=0; i<64; i++) - if ((error = pci_write_config_dword(iadev->pci, i*4, pci[i]))) + for (i = 0; i < 64; i++) { + error = pci_write_config_dword(iadev->pci, i*4, pci[i]); + if (error) return error; + } + udelay(5); return 0; } -- 2.18.2 _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees From mboxrd@z Thu Jan 1 00:00:00 1970 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=-13.1 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 697E1C43460 for ; Mon, 13 Jul 2020 13:24:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 48CE82072D for ; Mon, 13 Jul 2020 13:24:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GfVbLOBw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729919AbgGMNY2 (ORCPT ); Mon, 13 Jul 2020 09:24:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729975AbgGMNXH (ORCPT ); Mon, 13 Jul 2020 09:23:07 -0400 Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0774DC061755; Mon, 13 Jul 2020 06:23:07 -0700 (PDT) Received: by mail-ed1-x544.google.com with SMTP id h28so13716203edz.0; Mon, 13 Jul 2020 06:23:06 -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=1igF4d0BlRch6oTsOMsklRo2hJykPi64NTGjSwxBH2w=; b=GfVbLOBwTQM68ys28gmEsLzbrBK1b+c6gCAsHBPLuU1sBU4FxzUQzy/FNV+5JwZOZm kR1VcVfpphRXsdfwIXVx0TAIiRR2ezTv5Ddtc5q6AGYct5hmINAtuH2sc4z+kABGsA3q MZpWVLyzERoP5ZgKwWxgZ/Bwb6KkGfAYQ9yYfsAF7q7g9s64zC4q4x7y4lMUurO7OOP+ GRtkarmdVJUSPnTc67hb7A1PCAolXIJeajY5fisQ/pGpWykWJ6NKryHtSJ+mG/rXcimM ZkVft5Cj3VHZrbAZSjJNYb5UM7QM1G0i5UELVPbI1106MfxiHosmC6D9IGT7Iu7SHFu8 L03A== 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=1igF4d0BlRch6oTsOMsklRo2hJykPi64NTGjSwxBH2w=; b=gJSX5mC990yYxLc5htqCy0iSJF9M0lYNw2NsATvQF5+IlKKoJiRV/kEymYvPq6A89b 61n5pcpPVbscu8p4Wd19aQarKcOuF6u5mLGCTHZL/8jJMAupjY/OVfTOQ9OBMtjwoekV Vx6x3FpcwJIi68OlhEnj8JM5gyFxk5ZORfsASja4jFgBtVXM9vVyeWQwrXBs+5GJQsA3 5nIgl7vbCJO97iajzgXlBVu62i18LmWgOYfHXT3/n7DmkNccfD/4W6QYz3M5aAnyyzAr jVpubpflV77APN357c0SE3v/zGhVqKaTpzjkLHMt14hGogtSRZNxdFl4Fr+5VdiYEUtj PJfw== X-Gm-Message-State: AOAM532D2mUbi7boe1G7SYNQPUeetqFwx3i+XHlxVhxBR/NjFIUPtOtQ kD9BsZFoLVxrptCYcWqp2BU= X-Google-Smtp-Source: ABdhPJxLeJeo/pnR11earKOB22YmNVCGTeYK935Hvqyg5TcDWyXANgwsI03EL03zM4adEjgBZ464zw== X-Received: by 2002:a50:f392:: with SMTP id g18mr67987969edm.151.1594646585767; Mon, 13 Jul 2020 06:23:05 -0700 (PDT) Received: from net.saheed (54007186.dsl.pool.telekom.hu. [84.0.113.134]) by smtp.gmail.com with ESMTPSA id n9sm11806540edr.46.2020.07.13.06.23.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 06:23:05 -0700 (PDT) From: "Saheed O. Bolarinwa" To: helgaas@kernel.org, Chas Williams <3chas3@gmail.com> Cc: "Saheed O. Bolarinwa" , bjorn@helgaas.com, skhan@linuxfoundation.org, linux-pci@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org, linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org Subject: [RFC PATCH 21/35] atm: Fix Style ERROR- assignment in if condition Date: Mon, 13 Jul 2020 14:22:33 +0200 Message-Id: <20200713122247.10985-22-refactormyself@gmail.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20200713122247.10985-1-refactormyself@gmail.com> References: <20200713122247.10985-1-refactormyself@gmail.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Move assignment out of the if condition Fix style issues in the for-loop Signed-off-by: "Saheed O. Bolarinwa" --- This patch depends on PATCH 20/35 drivers/atm/iphase.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index 2c75b82b4e7f..584d9be5fa73 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c @@ -2294,13 +2294,19 @@ static int reset_sar(struct atm_dev *dev) unsigned int pci[64]; iadev = INPH_IA_DEV(dev); - for(i=0; i<64; i++) - if ((error = pci_read_config_dword(iadev->pci, i*4, &pci[i]))) + for (i = 0; i < 64; i++) { + error = pci_read_config_dword(iadev->pci, i*4, &pci[i]); + if (error) return error; + } + writel(0, iadev->reg+IPHASE5575_EXT_RESET); - for(i=0; i<64; i++) - if ((error = pci_write_config_dword(iadev->pci, i*4, pci[i]))) + for (i = 0; i < 64; i++) { + error = pci_write_config_dword(iadev->pci, i*4, pci[i]); + if (error) return error; + } + udelay(5); return 0; } -- 2.18.2