Message ID | 92eea403-9b21-2488-9cc1-664bee760c5e@nskint.co.jp |
---|---|
State | Superseded |
Headers | show
Return-Path: <linux-spi-owner@kernel.org> 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.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_SANE_1 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 4B6D9C12002 for <linux-spi@archiver.kernel.org>; Fri, 16 Jul 2021 14:35:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2FFFF613F8 for <linux-spi@archiver.kernel.org>; Fri, 16 Jul 2021 14:35:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233122AbhGPOiK (ORCPT <rfc822;linux-spi@archiver.kernel.org>); Fri, 16 Jul 2021 10:38:10 -0400 Received: from mail-eopbgr1410089.outbound.protection.outlook.com ([40.107.141.89]:46018 "EHLO JPN01-OS2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232988AbhGPOiK (ORCPT <rfc822;linux-spi@vger.kernel.org>); Fri, 16 Jul 2021 10:38:10 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fal5tWAMS0lY/iRy2t3gZT4GKnF92kV9Aqu0Xmx8cyOvSwIWQ39p3cyrF6nKKeoUkLuaRk+fQfg7rcvbfoXSq62QHLy3ezzJCJ8E3ZeYMKsZdklTrCvqYnkuUxj1U+cpNwc0Kn54GsyDegiyLRSChYDQyMhO/6tmce2jU3uFowGQdPUc+OCd/tucKMUc72zzT2nnwd6Y2sbUvkZJ59Bn5oq/vohEpNSICpepcJ9X0UlY9smpRozXBLm4sF+mO1J/V1kpayxVVQLEb2cUEHTNktXo4WXavKVCx6DP/4+Fp5lR0TmtxMmRhWaykYtNgQmZbJZMnDlgQAAtCDpKBX32fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wOoX0RERd88j38vnZ45RHCQXZXrL7etzrOmDg0pIZug=; b=YH0Npxaok0FcF436q4meN3anPAWwXZU+1ab80Jj7TayO6MYV8AdWWrzmWgk1SEcns7bCEBbnKo3VdyO4Ym4603ChsyAfqvl1pBds4Npfa6OjY+5wowTc3SvnnhmCWHCNamS4C4RPjiBHq/TmKDg5JSItbC3mRsruowZssmDWJitS8laGs6ULzec8/g9ROImAfPnv1sIo5jvuRt7AKDYWhu26vruyZq57IV4wWL2Mq6WTpUpYz27LS0s/g8q1UADmxHY1JYRLq1tmJN9uP66s8sYUMdq0ziJk7pKzbNsNmsGR5zUZZcChZmrL33EO1IOUGXI4NpNl7m1aEUake2BLJQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nskint.co.jp; dmarc=pass action=none header.from=nskint.co.jp; dkim=pass header.d=nskint.co.jp; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nskint.onmicrosoft.com; s=selector1-nskint-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wOoX0RERd88j38vnZ45RHCQXZXrL7etzrOmDg0pIZug=; b=PqGNkAGmZRRqaCKNjS1tNt7hDWaN4tcjnbNCBEqfuwRBFtmzRmvd87xdyLvxxDaIejeOI9EAuZMZgLHQrq2a56ag6ow9ZtvVs7XqHvFdxrk5aDuJjy9TNRPNQaB25a3qKhgKvOqtHB9wTlG8pQNmCxZxfLgotcJSSjRIleJ1lGE= Received: from OSZPR01MB7004.jpnprd01.prod.outlook.com (2603:1096:604:13c::9) by OSBPR01MB4278.jpnprd01.prod.outlook.com (2603:1096:604:76::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21; Fri, 16 Jul 2021 14:35:13 +0000 Received: from OSZPR01MB7004.jpnprd01.prod.outlook.com ([fe80::94dd:c412:338:709e]) by OSZPR01MB7004.jpnprd01.prod.outlook.com ([fe80::94dd:c412:338:709e%5]) with mapi id 15.20.4331.024; Fri, 16 Jul 2021 14:35:13 +0000 From: Yoshitaka Ikeda <ikeda@nskint.co.jp> To: Mark Brown <broonie@kernel.org> CC: Yoshitaka Ikeda <ikeda@nskint.co.jp>, Philipp Zabel <p.zabel@pengutronix.de>, Pratyush Yadav <p.yadav@ti.com>, "linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>, Masahiro Mizutani <m.mizutani@nskint.co.jp>, Ken Kurematsu <k.kurematsu@nskint.co.jp> Subject: [PATCH v5 2/2] spi: spi-cadence-quadspi: Fix division by zero warning Thread-Topic: [PATCH v5 2/2] spi: spi-cadence-quadspi: Fix division by zero warning Thread-Index: AQHXek/JTWLD5iZQsU64LL3ZCMDkDQ== Date: Fri, 16 Jul 2021 14:35:13 +0000 Message-ID: <92eea403-9b21-2488-9cc1-664bee760c5e@nskint.co.jp> References: <bd921311-5896-b228-ea6c-20e11dfe62e3@nskint.co.jp> In-Reply-To: <bd921311-5896-b228-ea6c-20e11dfe62e3@nskint.co.jp> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 authentication-results: nskint.co.jp; dkim=none (message not signed) header.d=none; nskint.co.jp; dmarc=none action=none header.from=nskint.co.jp; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7de8799a-ddb3-47f5-6bf7-08d94866ec2b x-ms-traffictypediagnostic: OSBPR01MB4278: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: <OSBPR01MB4278EDA1BFE4BBC8C431ABEC8B119@OSBPR01MB4278.jpnprd01.prod.outlook.com> x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3EtXWmNq+66GCG2++RS930YqhJA0DPQxH9nHzn3n/8OUAB17ZRUuzcBwGw4Q7M1f5Zuy7LAp16CcoSvp7+luu68MVaet3fxl0G97pVAxnPf6YSqMwE2ElFSnTrTEbRZKql7YNMrQBzT+0LC7I99443HuzmICF2x/ssvEsvpaSUNy3zAeL1lSAQRlW2pqxyNQaG2IYB4lnk/Cc7L3/YtuR9DxRFBP2dt+PomMPmy5qDIm9MFk4GVsBAXxe5apsKETGMyA0zgifLpCkWL15/chGFMpjFrfr8izOsnUTrCvDuoXjBVqp9DXFK2libT/5tZ3zVOZ5JLxjnqehizEzBNe+UJ8lia1O2KV9VoKgKOSOYCHoTmFEcl4/4mjL3aqM4lU5ew1x+gFs4kIyyM5NC4ThWBbkOx1orRDNafJCtelYk9nZ7/sPRNSTmj76zxqzNIWe94QoD8e/NwHyU2qTsOrymknXEsFHjJw+RVax8DM+LetyfJhWHH48oZE+cwqOhsx3+OtTTDF8wMEEpXLdYTZcUbcr+7b4wKBzan6lXBf4FSEnVzmnnPRC9DXXmuv5Rt06khbHsDT7aFmzMjwnGNXpK0TetJWXKB2r4x6z1dCStTHkXzdboErMrEi58QMvxSvVJxjulpZSyU7xTqFQvdRfc1O6ObEJrpcWgLK+4IgTVzpkBOrbt1QQz07NGeAoeYoeCnbw1FSd5Hgw4gNo/GlxAVNjg1qH257UG0JU2YhjA62vJ1zZpFWTAL+nxUyWZLVgYMiIJiRTPW9cDVusxfNKg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:OSZPR01MB7004.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(346002)(39840400004)(136003)(366004)(376002)(122000001)(38100700002)(6512007)(83380400001)(6506007)(6916009)(54906003)(31686004)(36756003)(31696002)(107886003)(8676002)(86362001)(8936002)(2616005)(26005)(2906002)(66476007)(66556008)(64756008)(66446008)(66946007)(76116006)(6486002)(316002)(4326008)(186003)(478600001)(71200400001)(5660300002)(43740500002)(38070700004)(45980500001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-2022-jp?b?QVliZ1l1UExRTlVu?= =?iso-2022-jp?b?V0NrbkdwZG14N3JvL3JXbXZHcXE0YTkyNnRMMlcrMWJsOVdq?= =?iso-2022-jp?b?aTcyNmFGa21EbjE5WE1yN3VCS00vYVk2VDdKN1RrY0tGbXQ1?= =?iso-2022-jp?b?OFJkSWFobU0zSTF5WXdQb0pBS1VFeks3N2lnaldMcldSTVdK?= =?iso-2022-jp?b?VyttdXdhVFZmN0ZqZmxnNGRkMmNtL3NRZmtnc2pVNHhxeDZp?= =?iso-2022-jp?b?QitrK3lDMnFIOUowUHFoZWgrT3NRbDRIbERmUjkzZ1BDTG40?= =?iso-2022-jp?b?QmZLL2YyRWV4ZENBdEhJRGtCR1lNM1BVZ1Z2MWE2Q3lSVlpM?= =?iso-2022-jp?b?V0hJdGdncnQxMkRoOFgrbGNBd0NtbEkreDZKWDNLTFNzV2tr?= =?iso-2022-jp?b?SFpLOTdoNmxGZmx6bmhoWkN6TVlHQmpRNlNsUU5UeURiYUNY?= =?iso-2022-jp?b?MkR4My9wa2pvMTA2WjdEYThJWTNPQ1FDT1BHVHFyWmg3am8r?= =?iso-2022-jp?b?VzZiQ1B2YnNZYTFzSDdOSkpmQWZzcEtLeTdvc0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Mitrczg1cXFJUWM2Y0s4OU83Y09jWWFEVjA5ZnAy?= =?iso-2022-jp?b?a1dSYWNPSU0zczh6UTQ3UWo3MCtHVEpKNml0NlJNbFg0T0t4?= =?iso-2022-jp?b?QjZCLytkeXRrcE5QMXpuZklvWUk0czc0QUJZL1k2QjZXTHZX?= =?iso-2022-jp?b?UFFFUER3WlVETFpXcW5kQWI5Qno1Z3pramlqZVJVVUVMV2Vv?= =?iso-2022-jp?b?eUV5RGpDck1MZ1RBN3VtWDNCZHh5WDFMbUZKOEdOWkV2Qldw?= =?iso-2022-jp?b?L2ZPbUlTWFRTeUZld3ZUOXAwekRTZWNGaWJOeDVqSzIzaVVC?= =?iso-2022-jp?b?aHlPMmxaM0w2Uzh1L0tYNjdOVHc0ZmVLejRxYXg2ZmZZc01q?= =?iso-2022-jp?b?VTRCRmFmaktJNTdwQmxGQkd3SjhHS2p2YWpUV0FYbi9jSFpQ?= =?iso-2022-jp?b?bmR0NHhtUUhXWkNLSUpsYjVsa2RqMDU4QUcxNXltOHdvbWdJ?= =?iso-2022-jp?b?Y2Z6aXRXZlIwYmZIRjM2VXpjYUlrSnlaNnlGeFl1MkswVFc5?= =?iso-2022-jp?b?ZXByN1VvamlXMk9LUS9Bb1EwWk1pRHNlQk1QZU5EcWVSMU9J?= Content-Type: text/plain; charset="iso-2022-jp" Content-ID: <1563C88FFEACCF4BBEF972AD0151C488@jpnprd01.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nskint.co.jp X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: OSZPR01MB7004.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7de8799a-ddb3-47f5-6bf7-08d94866ec2b X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jul 2021 14:35:13.4902 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 727455a2-9822-4451-819f-f03e059d1a55 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: NkVbphohn+y7FJ2GUa6IqDrUKJFquBtsvwGPLtU1+A1/QlLQegVZDpcq64km2wWa7Uc4C9e/fjL5Ajqt4YYkAA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB4278 Precedence: bulk List-ID: <linux-spi.vger.kernel.org> X-Mailing-List: linux-spi@vger.kernel.org |
Series |
spi: spi-cadence-quadspi: Fix division by zero warning
|
expand
|
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index 7a00346ff9b9..d62d69dd72b9 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -309,6 +309,9 @@ static unsigned int cqspi_calc_dummy(const struct spi_mem_op *op, bool dtr) { unsigned int dummy_clk; + if (!op->dummy.nbytes) + return 0; + dummy_clk = op->dummy.nbytes * (8 / op->dummy.buswidth); if (dtr) dummy_clk /= 2;