From patchwork Mon Sep 14 08:49:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 11773295 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A8B39746 for ; Mon, 14 Sep 2020 08:51:34 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 7821120756 for ; Mon, 14 Sep 2020 08:51:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Mwr/adZc"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="OGWWk4oU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7821120756 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=etQcPLiysAX//C86a3hA+0qfQj8sPa59Sdsu8cHeSpk=; b=Mwr/adZcxUYh43P9PscfFQknt vFW9ZymnbdHnJ0OvNxemUCa7gkmlPF0jmGDDhTjXcZJOM8c974JmsBbONXrp6TRqzULTAhHXxKb04 kjAcHggl2OAYSKdTH3XPB4pcZUNQNI/fG9i/Tg2GAgzlsZuvXSg8OIoGZyR2BAgP+lmblCHYz0DGm bvN09oIs81l//L8KITml9YM78wKX94w/L728FctWLxzTzHAgBgNqYJWoBfGBG13kafm188f8qsYrF GDNHnykfBnroq1EZVrUcQU71wEYkAYmpzgY1o8kYtLNXRykgYu40Ym7W5qfR/mjuQRkWOf7T+QfLd yq1+lzn6g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHkBf-000829-M3; Mon, 14 Sep 2020 08:50:11 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHkBa-0007zp-5w for linux-arm-kernel@lists.infradead.org; Mon, 14 Sep 2020 08:50:07 +0000 Received: by mail-wm1-x341.google.com with SMTP id x23so9805750wmi.3 for ; Mon, 14 Sep 2020 01:50:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6RihlPiUoKJ5dO8u5VgwLil1hFKYQdPZrQdkm6dxH7U=; b=OGWWk4oUqeZhemDzsBit+3ybTzgLDKa8+inPhCSBdmqT0VzUjdt473bbAx3PXD/Me1 eom9s9PKN5pOuPDzFY8AmNEoCYJLd74DOxySWtNOyilvYNdjkPP9vo2ruWNm2vZzzLwc clrzILcPcXnV9H59MtGhVLK9Q3XhKSWhFpes4vKRRbtz1Ujtg943pwlv3IOxo4PawCsA wFlI3O3k5pELJnuaLXjy1AocjNWv277s1Z7ijKfV7B8NMJefnKlW5XwzMPckNmVoAcDa MHjzDGi6vpv4Pd0z8TG8BIYNFAwiOvw3crmxTlPMJ8DAudVkWC6dooPf1kpLi9WwgHfs KZ7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=6RihlPiUoKJ5dO8u5VgwLil1hFKYQdPZrQdkm6dxH7U=; b=e3jpmjm+geOhtiIIchYuaCb5AJaodLO1zq3f23qzYI1cHcQjNFq164+zP9NJX8Ik07 CAfcyXHmuSSmj9emUaKn/66AY6TOynLZ6Nx5LwfmtKDtXZ6/MzqDJYAO7k4j4N9k0j0+ JKTvqZ28ii+XqUzHdmjntUvJN8aEqmsCnQQcEzzV1LwNIjV2UGGDh8jxjGQpGxd/qulm n10nEB3zDzirMAv1JNaqU4Ae/bF0y9p7+JblMdgAUXxDRoQmbxIheraEvuhBoeIh4kKJ XRA96rp4T3eN49SCkskQA/JFAOWqKZBPkXU5pWi7AtS0fDdvijS+brznEtDtKGGx/heH 4OTA== X-Gm-Message-State: AOAM531oQzXwuggnFmQRCUnsIF10xxlSICYyETfhYL+8eU0z05ZEMgE0 0C+YqYifX3oGVKrEbvBeZOCuvQ== X-Google-Smtp-Source: ABdhPJwdaqg5f5Kke+vMgGPevV790jo7Y8/D5K3C8rI0hjcUYSusmPhaIAH2G6dWHFzgQjwy7rM1wA== X-Received: by 2002:a1c:750d:: with SMTP id o13mr11267961wmc.54.1600073405221; Mon, 14 Sep 2020 01:50:05 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id q12sm18980386wrs.48.2020.09.14.01.50.04 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Sep 2020 01:50:04 -0700 (PDT) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu, michal.simek@xilinx.com, git@xilinx.com Subject: [PATCH 1/3] can: xilinx_can: Limit CANFD brp to 2 Date: Mon, 14 Sep 2020 10:49:56 +0200 Message-Id: X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200914_045006_320351_469201A8 X-CRM114-Status: GOOD ( 16.03 ) X-Spam-Score: 0.3 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:341 listed in] [list.dnswl.org] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Naga Sureshkumar Relli , Srinivas Neeli , netdev@vger.kernel.org, linux-can@vger.kernel.org, Marc Kleine-Budde , linux-arm-kernel@lists.infradead.org, Appana Durga Kedareswara rao , Jakub Kicinski , "David S. Miller" , Wolfgang Grandegger Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Srinivas Neeli Bit enlarging is observed for CANFD2.0 when brp is 1, So change brp_min value to 2. Signed-off-by: Srinivas Neeli Signed-off-by: Michal Simek --- drivers/net/can/xilinx_can.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c index c1dbab8c896d..f4b544b69646 100644 --- a/drivers/net/can/xilinx_can.c +++ b/drivers/net/can/xilinx_can.c @@ -259,7 +259,7 @@ static const struct can_bittiming_const xcan_bittiming_const_canfd2 = { .tseg2_min = 1, .tseg2_max = 128, .sjw_max = 128, - .brp_min = 1, + .brp_min = 2, .brp_max = 256, .brp_inc = 1, }; @@ -272,7 +272,7 @@ static struct can_bittiming_const xcan_data_bittiming_const_canfd2 = { .tseg2_min = 1, .tseg2_max = 16, .sjw_max = 16, - .brp_min = 1, + .brp_min = 2, .brp_max = 256, .brp_inc = 1, }; From patchwork Mon Sep 14 08:49:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 11773289 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8DF02618 for ; Mon, 14 Sep 2020 08:50:28 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 58FB6206DC for ; Mon, 14 Sep 2020 08:50:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oReTCfZT"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="ggbwbppV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 58FB6206DC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2f5QwdoMaoeXjYTTp2QnplPiJoVZSiICUNQBREbXPmo=; b=oReTCfZTCtRI49tfVRhpyEgM8 RKK305NLwHP6NQMPiI/lQxZ7Cp1Gse6LEO+w3/Ek//ySQVQD8RFix73Jf+bTxwSFkYpGm9HwQwPe+ uJNiWDutjjeaiuRBKElkIGwkzdg5pG7hTz5oVfEBUog6hjynFtSPNGR8YFfpnJv597fFwjjOB/hc0 VB5LUcX9GbQwx6q9iL2PsuG9V/1HNcHAGc+b0MM1Hdf83gKDKVtKWnZJq+PIb+Yztm/begM8aXRSl lYaZ2dT2OYpG6BS8NGM+nXCaRjp8ndIhaZbsANJaLM+yg8ReVYpyQbyi2cp9XNONgT09wlb8JsuD7 jsqXwroTw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHkBm-00083W-2I; Mon, 14 Sep 2020 08:50:18 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHkBb-00080c-PK for linux-arm-kernel@lists.infradead.org; Mon, 14 Sep 2020 08:50:08 +0000 Received: by mail-wr1-x444.google.com with SMTP id z1so17763765wrt.3 for ; Mon, 14 Sep 2020 01:50:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Tnhr79mi4DKCMRU16Knp1ByZEtd2oOyfWvrEsPnasz0=; b=ggbwbppVHTxdFbCi0nMw/1Da6Zuoa6rODfIkC4FE1354F9DP6tyBWSrzqrTfGrfQX3 Gj3UYObzDxfj8+PrK/feQQLBRLx2I/GYO7OxagaLX5SDn+e1/8CtiTGKL59uCWEoQQmq DYzsdbhUUPe/7aPlqDxd4heNSLaTOKiErKd2BoSsiDPjtlFfnJA50MOiIkWliA8UVtHp 8/P9G4uvJdQ0msLNBk0ougfo/eJmMaE6b9P33WjgAgNkaw6Y2QIf5lLK290s265Zi9v9 FRhQriOKoyy+3IdK3pL5mqov96frfb4LELX34Inb/XDcOLQ47joFRAwjqMBknsUNPOaz vW0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Tnhr79mi4DKCMRU16Knp1ByZEtd2oOyfWvrEsPnasz0=; b=azj8xM2PinL87eJ5bRCoLDDSg9cCho8fTFCZQH6CpaC+eVbD4qG5JEJuUv6goWJLRT ehB4Ro1D5XWAF0hx3R41Vi6AyqBJOpjAvd0gDvh1N9ptLZzM0srGHWaVaLK4coKCqGDn xhDsD/Hrogxm4YEwBghBvi5ql9rTmk6m/+vFqIUBE/LSwdNnEo3Hnq/jB2x84oxMQFPC 2wcf3UB9M8KovhbJ3QCsUCLkcl+RfNX7Z8/O0eEsgQKwALdeqjxcWP/g+BcqdIRQYYxB n1v35iEwC/DSQxqqY8LorkEXIfg8VUa4yKbDvadavwaDi+SLT84qa71fcptdqOtBQIVI BgJA== X-Gm-Message-State: AOAM531A3irfZReSIQ1Q3VofkFAWgXz3dvqRnpYNraLNgMsnfBoZoRCH 0EwB2DQLURWrdE+mWlvFg4ulRw== X-Google-Smtp-Source: ABdhPJwNn8yyjbVS7CEijF6HJmDzLprYpyLbe3fkcIfXlK11CXthgCbgprAuNq7BPa8a1yvOLYbL6A== X-Received: by 2002:adf:bb8c:: with SMTP id q12mr14828713wrg.393.1600073406766; Mon, 14 Sep 2020 01:50:06 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id w21sm19324776wmk.34.2020.09.14.01.50.06 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Sep 2020 01:50:06 -0700 (PDT) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu, michal.simek@xilinx.com, git@xilinx.com Subject: [PATCH 2/3] can: xilinx_can: Check return value of set_reset_mode Date: Mon, 14 Sep 2020 10:49:57 +0200 Message-Id: X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200914_045007_869530_836CEC14 X-CRM114-Status: GOOD ( 15.50 ) X-Spam-Score: 0.3 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:444 listed in] [list.dnswl.org] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Naga Sureshkumar Relli , Srinivas Neeli , netdev@vger.kernel.org, linux-can@vger.kernel.org, Marc Kleine-Budde , linux-arm-kernel@lists.infradead.org, Appana Durga Kedareswara rao , Jakub Kicinski , "David S. Miller" , Wolfgang Grandegger Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Srinivas Neeli Check return value of set_reset_mode() for error. Addresses-Coverity: "check_return" Signed-off-by: Srinivas Neeli Signed-off-by: Michal Simek --- drivers/net/can/xilinx_can.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c index f4b544b69646..3393e2a73e15 100644 --- a/drivers/net/can/xilinx_can.c +++ b/drivers/net/can/xilinx_can.c @@ -1369,9 +1369,13 @@ static irqreturn_t xcan_interrupt(int irq, void *dev_id) static void xcan_chip_stop(struct net_device *ndev) { struct xcan_priv *priv = netdev_priv(ndev); + int ret; /* Disable interrupts and leave the can in configuration mode */ - set_reset_mode(ndev); + ret = set_reset_mode(ndev); + if (ret < 0) + netdev_dbg(ndev, "set_reset_mode() Failed\n"); + priv->can.state = CAN_STATE_STOPPED; } From patchwork Mon Sep 14 08:49:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 11773297 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4E6AD618 for ; Mon, 14 Sep 2020 08:51:48 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 16EAA20756 for ; Mon, 14 Sep 2020 08:51:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PNyLaP1J"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="l/EV8WRl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 16EAA20756 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ug8LBeBpN2M4cP8NaS/TkzLLps+HfOPHS/Ybiw7o6kA=; b=PNyLaP1J2Br65JI4ONbXiyFCH UXfOPaBw+N600EKnDvTakNDT72M1cIJe0np7jR7SL3ynn/Y6WglUWTZCocM5U1CGqGLosDHgejmD6 EprTWnqLLF5WYeu09FEBOxQGWMZomh8TuU7oAMVVJCA+cLLPpjt4J3Gw6ysq1Ei/nR8SRebfNWL5v 1NY/4hTVPuTKd+ZbT7Lw2XlKSPM+OSjq2kpGRVYV6Jym1IEYj+GgoPiI/Hrpzl68ZC5luN6sZGVtr rWm7vWguAMqJDqNJAPQs8+Qqa7M9i09Qum0PTTNbm3uDZUFFgmecVBDdDZYxsnjTt9/Fetajh1qp/ 3jm58HshA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHkBr-00084s-KP; Mon, 14 Sep 2020 08:50:23 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHkBd-00081J-4D for linux-arm-kernel@lists.infradead.org; Mon, 14 Sep 2020 08:50:10 +0000 Received: by mail-wr1-x444.google.com with SMTP id c18so17739188wrm.9 for ; Mon, 14 Sep 2020 01:50:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rOuDYNhd1Y5ud5FTj27+NxJ3Of7Hu1ANeTXNQ89wUxQ=; b=l/EV8WRl7sWHYBy73eHItd5zdjECPLnliI92dOSvSWvYDUnU2cuYVi0rvxl66FDh2T tuSNqz+Nx4xXRwhHEsu1GPbA74Up1shUnObJksSEr/dQpVdVmOxAbuDl5E5F1Tzobag3 wTMrdA7YOeMlTq3wo5ZEAkrpMgvYh80QQKE0Ok5ieV9RowZb851bamiBwqJhGeceA2wj b9513TZMaIymzFcWSnqe2rlozdi5Sqqh1h8oOul1JfUlsu00KOSPQAMMlKBiFqjj7340 9b9dNLMXOC4XGSzx7LTw25QyLIbr/e8wOq4i3aag4hjbAB7UTj1wLAhVC8zs2MVUBmbb jpAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=rOuDYNhd1Y5ud5FTj27+NxJ3Of7Hu1ANeTXNQ89wUxQ=; b=eN2UqdwKzxeHyvHmAtIofx2i6i5SmZt+zgy/abWQx2mzhjvBCzZnrz857sL4m0gdod xFma1QuPU309WCJHsGVUjOMz6Eqn1NWdnfH+Hzlkm76/vKMxYiKEfLDNkQYejz+HzwpO BzTuF5rrryzZf+upadtYl74szTPODIylDqt1NDR0+E4SefEEMFpgo1wnOuYonFgT2WYZ 3pRxcxk6FAOA9pYPkPY/frhKDlXokSFqjhbB6QA2753Sb0OBvBhF4aHr8eIX8mW7WMFs UeahD2saHK7p3lUYazZcDweSstYcIjzcn4Htmed+Pev0nSy273FtrDfevIwOBIt3yAh/ 4A0g== X-Gm-Message-State: AOAM531/Yku4QnI6WOXkSZLnx9tF6y0D7wmqiGp3BqF1wUF79drcwGa3 3BDbkFuoQIIWKQPYEY8RNOeCCw== X-Google-Smtp-Source: ABdhPJwF07/4H0OMXhAy5gL+VhoH+7Eb+10EYNtSdmKWyBjS7M08xEGD/WQEM0cG9zdKo4oUX5hI2w== X-Received: by 2002:a5d:620e:: with SMTP id y14mr16069452wru.371.1600073408285; Mon, 14 Sep 2020 01:50:08 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id o4sm19305669wru.55.2020.09.14.01.50.07 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Sep 2020 01:50:07 -0700 (PDT) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu, michal.simek@xilinx.com, git@xilinx.com Subject: [PATCH 3/3] can: xilinx_can: Fix incorrect variable and initialize with a default value Date: Mon, 14 Sep 2020 10:49:58 +0200 Message-Id: <0651544d22f3c25893ca9d445b14823f0dfddfc8.1600073396.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200914_045009_227061_94166C54 X-CRM114-Status: GOOD ( 16.56 ) X-Spam-Score: 0.3 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:444 listed in] [list.dnswl.org] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Naga Sureshkumar Relli , Srinivas Neeli , netdev@vger.kernel.org, linux-can@vger.kernel.org, Marc Kleine-Budde , linux-arm-kernel@lists.infradead.org, Appana Durga Kedareswara rao , Jakub Kicinski , "David S. Miller" , Wolfgang Grandegger Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Srinivas Neeli Some variables with incorrect type were passed to "of_property_read_u32" API, "of_property_read_u32" API was expecting an "u32 *" but the formal parameter that was passed was of type "int *". Fixed the issue by changing the variable types from "int" to "u32" and initialized with a default value. Fixed sparse warning. Addresses-Coverity: "incompatible_param" Addresses-Coverity: "UNINIT(Using uninitialized value)" Signed-off-by: Srinivas Neeli Signed-off-by: Michal Simek --- drivers/net/can/xilinx_can.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c index 3393e2a73e15..46c04b6390f8 100644 --- a/drivers/net/can/xilinx_can.c +++ b/drivers/net/can/xilinx_can.c @@ -1671,7 +1671,7 @@ static int xcan_probe(struct platform_device *pdev) void __iomem *addr; int ret; int rx_max, tx_max; - int hw_tx_max, hw_rx_max; + u32 hw_tx_max = 0, hw_rx_max = 0; const char *hw_tx_max_property; /* Get the virtual base address for the device */ @@ -1724,7 +1724,7 @@ static int xcan_probe(struct platform_device *pdev) */ if (!(devtype->flags & XCAN_FLAG_TX_MAILBOXES) && (devtype->flags & XCAN_FLAG_TXFEMP)) - tx_max = min(hw_tx_max, 2); + tx_max = min(hw_tx_max, 2U); else tx_max = 1;