From patchwork Fri Jul 16 03:07:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshitaka Ikeda X-Patchwork-Id: 478695 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=-10.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, 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 9857BC636C9 for ; Fri, 16 Jul 2021 03:07:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 73D05613E3 for ; Fri, 16 Jul 2021 03:07:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231725AbhGPDKS (ORCPT ); Thu, 15 Jul 2021 23:10:18 -0400 Received: from mail-eopbgr1410048.outbound.protection.outlook.com ([40.107.141.48]:25719 "EHLO JPN01-OS2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231230AbhGPDKR (ORCPT ); Thu, 15 Jul 2021 23:10:17 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K8BKl14bHJU7H0I+MS5QCnNBg7ezWCtcukGf4eoLfJjxC56MPVnc09BRkHComVgOYZH9wsR/ZDaJpanN8V3DLg9kY5pHdcPxJSXMQEjgZOcGvCRqDd3cviKuCxwYD2g1yZy1YteaterxeFSV/i/9d9VuNTgGmDusNG8Zl92+6+hhC4J8IIcWikyH1fKS4mhzu46St1VbvhHanBjAxfZd8hDFHoGhuHxz1JoS9IMfOHXlUnsdatmT3z7i0AxF1LohrSHVilab9NUpYqBQ/jv1trJUwIQ6wZs5reH6/9Yp1+oXRu30AAdr56id8EvEZjtK0Hs77S529jjABN8Ek59LDg== 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=wgSiu36PgsIp0YAC9EG8h5qSRgZDaJ8JQX9ApzUk9OA=; b=b6wjlRTsyg47xXmAtvCqRntVsACQoBEgahQtMY2IntuMXdr7HVduib20EQmNwndG7OdVp0ECEvU0OPeZaKQ0vpESehK74tPBT9uUDS8OYJmD0ptcFpAuc59MEcweTaViDop0kdldJvLgVYnaeVIx5+rkLClODy5PzG6/ooL62B/BUwBJpkMZu/HUbrfeQYo6HH/Tk3ExCrSEPAp9VlN8wKalUfI2qBL69Z7ukJKm3AjdYOGDJO4K/zvG5rnJZdVhVEnLkXlF864w95SJ3smnD9hpjEqDwNyushXlITCNrwI302NryiFO7AhweeXtY3C/Is+qwc5vkAjhP0pMKYIgNQ== 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=wgSiu36PgsIp0YAC9EG8h5qSRgZDaJ8JQX9ApzUk9OA=; b=ALD/satzhb0EDhUlAzeOj3Rl5XrmzsBM+5fyc4TqiKt/8gvDPnoGKE2lNx7Yvzxu4tixEtKPVIxHNiFwGyUIKiEA9Pdh8pk1kVPQNoUVo6Jn4QqLJdwSy83nKR0UHFXq6kukCL+mE1tPBbGCGmxYrMbZlriENVcEWZc39RYTZV0= Received: from OSZPR01MB7004.jpnprd01.prod.outlook.com (2603:1096:604:13c::9) by OSBPR01MB3397.jpnprd01.prod.outlook.com (2603:1096:604:4c::10) 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 03:07:21 +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 03:07:21 +0000 From: Yoshitaka Ikeda To: Mark Brown CC: Yoshitaka Ikeda , Philipp Zabel , Pratyush Yadav , "linux-spi@vger.kernel.org" , Masahiro Mizutani , Ken Kurematsu Subject: [PATCH v4 1/2] spi: spi-cadence-quadspi: Revert "Fix division by zero warning" Thread-Topic: [PATCH v4 1/2] spi: spi-cadence-quadspi: Revert "Fix division by zero warning" Thread-Index: AQHXee+x3FoA8gJXskOlTO0d6TpkOw== Date: Fri, 16 Jul 2021 03:07:21 +0000 Message-ID: <760be709-74d1-14cc-fecf-433786e123aa@nskint.co.jp> References: In-Reply-To: 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: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=nskint.co.jp; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ef3e76e6-0399-43a1-d07e-08d94806d3fc x-ms-traffictypediagnostic: OSBPR01MB3397: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:215; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Vmid/59tpIlZan12fsUxvCH4v1XSZYjGK344AkzDj7tlN40UpimBTG62MGcs1qFk+40i1WFPggST081/gtr/toN9zISrb0zLAJo58N3gDu7aes788BlBOM4feOwq7lh8ArmrYfuRK+qJkIWC5I+8ncPQsl/PmfMoE8I2eOq+CqHoBNMJTPYsAkVGW9rZrHAN+LPOF3zkzWHo2ILFCaTqw/etApanHZLwbB7pQWmKr+habxOcKVmqZmwaeLBkq5ty4QmH7zpTHTChNafnNRX/tad/0Bw+S4aW5iK4UhCo86bsC3yVDuDiX9Qu/Fg0uE8KlrFESH8HBdiRjSWwBiv5nLLBA3Ggs9UII0LPzGR94kD0OsLi+kxb1464XcHeTM9Ci7WI2cCCBS5KwWrjGAdTl95hyURdFKGVjtEQUj4UlmHOCDpJddGJIdeUWDtYVUwGrosHAPoj4sRvzv+Y2jOlYXuZuo5/hbx0VgDOgeYeOUNJ2IwpW5skbcp0/VevLgu3PSTTcS6HxdhD32hZK2gB68Svx+E5fEU6eVrZ2+Pu3gO64qlQ42M5mifKHKJRM/2oWw5pMPGyWcNIvsaQa3Ww2SvgJLWDmPbED5X9gR2sLgdYkyg2YnVL4TksMfNtbN1/vkWgukYiV+zgUOUImoHqdufOufs+28bQ+zd9vdqMKb+LJgV82675i5PSz2wg0/ZvERFFbv3iJ2La65DBEGE3MTH6S9eH0mlAl85Y78G6w5S7qc5cIVsyNO7b5fuJVoYEo8UfDPjDNU0ty1tvoz4xnA== 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:(136003)(396003)(366004)(39830400003)(346002)(376002)(31696002)(86362001)(26005)(83380400001)(54906003)(6916009)(107886003)(76116006)(6486002)(64756008)(4326008)(6506007)(6512007)(66556008)(66446008)(4744005)(36756003)(8676002)(316002)(66476007)(2906002)(31686004)(186003)(2616005)(8936002)(478600001)(66946007)(71200400001)(122000001)(38100700002)(5660300002)(45980500001)(43740500002)(38070700004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-2022-jp?b?RUxIT21ZT0FMdlVX?= =?iso-2022-jp?b?dzZLSndLSU1nVXBOaHQ5QVdLNy8wRFZaUWtINDBidWFuMHlF?= =?iso-2022-jp?b?dFpvL0ZPR20rYlZlVk9hV0plVS9ucGNZS3VLUFhabTBMRHFY?= =?iso-2022-jp?b?OHViMWNGZDkyNE9waTFjc2dKSzFlNzEvKzMwM01BOGw4a2Ry?= =?iso-2022-jp?b?VGFuREN4YlVXVkJIbnlhT2ZBYytGYTUrVXlPdkhyUlo1Lzg4?= =?iso-2022-jp?b?SXdaYTVYNzlJYkZHSU5jb3RYY0lOMVMyeDJxanRvRWdpV0do?= =?iso-2022-jp?b?QjFDa2orc2VOalp6UHRyWVVzajB4UXNlQ0NIR1ZUNllocW5F?= =?iso-2022-jp?b?TmtWekVsWHdCbFlKeVNiNGNMUUsvZWVUbXphbG9tRWdRbEpN?= =?iso-2022-jp?b?Z01HTXpPLzNLd1ZrbXZDbmt6K2hFVVIrK0dXWlRjY01DdGZG?= =?iso-2022-jp?b?YVl4eFJ4Q1plL2FHQmM2S3dQU3IvejFqK2ZIRWltMS9CblRk?= =?iso-2022-jp?b?TC9CSVpERTYvSDBPUDZBdG1FczM3Tm5LVUJoaUVRc2x4L254?= =?iso-2022-jp?b?djNtVlBnZzg2QXFyMytsbjRYK1NOSTNqN0ZWSWZUNEJRamtt?= =?iso-2022-jp?b?Um5YNTlZb3lMQVdqeXdVbllyWHFac3hlT0k2VjkraVRYeUpl?= =?iso-2022-jp?b?Z0ZVanVtb0FZSzV2anYwSTF6WTdJRHV4cVlHb1RwN3BXQzFM?= =?iso-2022-jp?b?WkYzbTJFNHFqQ2FvREVwL3o5aUd3MkNNYTBDY3VPMWNCdnNU?= =?iso-2022-jp?b?Y24ySm84Ui9NakVJTVFRWlNjZGFkakp3SmJxdUVNYkxwdnAy?= =?iso-2022-jp?b?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XY204bk1vNC8rZVRI?= =?iso-2022-jp?b?b0w1M1R0dXRWMlZWalVZRWo4L0tseitsYzNLTWQ2Z29qMDYw?= =?iso-2022-jp?b?bmRnWGFNUTZkcFBkZGF0N2FDRnZ4QnZZUTIrQWdlTnZpaUx6?= =?iso-2022-jp?b?WXVRN1NoNWNFZ2xOdU5rZFlSQmFOR0xpcG16T3pZSFdzakV5?= =?iso-2022-jp?b?cGpIQUF2aTZ6SlFQNEVhTG1EY0NkMmI0RE5IZlZoVnhEQlh2?= =?iso-2022-jp?b?ekR4a3VQZEpyaHBLZ21HZDR5K2hyUXhXSTVyWHlMNzJzWFVI?= Content-ID: <17FC440D3275D9408C0087AB075BFBAC@jpnprd01.prod.outlook.com> 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: ef3e76e6-0399-43a1-d07e-08d94806d3fc X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jul 2021 03:07:21.2762 (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: TJ7aOFuxuKSyQ3d5EmUJzZYyptMMwtapakOJdi4DhuWN15YFXJJKlydm1k3D1THICQM3loIKjI2ac195fsnHiA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB3397 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Revert to change to a better code. This reverts commit 55cef88bbf12f3bfbe5c2379a8868a034707e755. --- drivers/spi/spi-cadence-quadspi.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index 13d1f0ce618e..7a00346ff9b9 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -307,13 +307,11 @@ static unsigned int cqspi_calc_rdreg(struct cqspi_flash_pdata *f_pdata) static unsigned int cqspi_calc_dummy(const struct spi_mem_op *op, bool dtr) { - unsigned int dummy_clk = 0; + unsigned int dummy_clk; - if (op->dummy.buswidth && op->dummy.nbytes) { - dummy_clk = op->dummy.nbytes * (8 / op->dummy.buswidth); - if (dtr) - dummy_clk /= 2; - } + dummy_clk = op->dummy.nbytes * (8 / op->dummy.buswidth); + if (dtr) + dummy_clk /= 2; return dummy_clk; } From patchwork Fri Jul 16 03:08:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshitaka Ikeda X-Patchwork-Id: 479511 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.3 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 492FCC636C9 for ; Fri, 16 Jul 2021 03:08:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2A50C613E3 for ; Fri, 16 Jul 2021 03:08:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231725AbhGPDLb (ORCPT ); Thu, 15 Jul 2021 23:11:31 -0400 Received: from mail-eopbgr1410040.outbound.protection.outlook.com ([40.107.141.40]:30771 "EHLO JPN01-OS2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231230AbhGPDLb (ORCPT ); Thu, 15 Jul 2021 23:11:31 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pk4SgrdA8LdpHgoVh8b02eP09hC6kzyioeqCIE8dEfszgHeApqTQ1i+bbPcBFWW3q1HsFbkBWC7xfSJl6qHIOXLC4KtPMRaF7MmZX8sL7j8FV0Kon9UJ3Evl8NXnIfKB98A+2jgr7tSW/ZC7DaNY0zF4hf7aasSwY3MctxnOKzqJQdZpgAvqYvrLetFPIG4nuRJ3hvg00N2Wa26Cs+UWwlwrooeJWNNBFb5GbjXNbC40RIg2GqQEC0yb5vtlGdiL9GQ080Kri+ii9AW2LS95sUJB5rmO1U2PILZWepUHwuQvtvKCjC+BnYps6KFF0ssmembVUFHjjX4rsX/qA/k9Nw== 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=s/HJGWIUnTml9o2T3rc/505IDPDjyT02LFJKolGRB1A=; b=lnEAPmE6nE4WJYFKWoL0FD1oy55zFs0kfs3wjnLG2N3TbXaqNfxl9Hz/R5GOqQUIpAb0M548M1lk5LSimZz7/Y9BRMix0NdXZ9DAhs7Soc2Z+eEGxDlVxbBqQXnj0m8g6Upe8+5wiVlKkiDhN1E/TPM9xr+mn/L3Y1coeTqMa2OYqcKS7rBqOraVs2TSOeUwz05n7U8L/QPXmSDw2a2Y/rjyqEAORgcFIN8DomG7o0XttC27FzSfrXajy7iC2A5/j29jjgKzJnOTu15fzpwsO1pZETU5fpLtmYlB9frMTG7+agUp8Qgfaw1emzadeEayCv+9/xS9CDdHl9V2uCGjnw== 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=s/HJGWIUnTml9o2T3rc/505IDPDjyT02LFJKolGRB1A=; b=ThQqoa5ehuaPB2vv8DdPDiUr1JI83GzYMFxCK6maYSvDnJFci9uL4bykmGXbaYqxdoRqYRF5nC3AVZj+Tqvzx6NBWXOjyWhmsnK1q7Tzd+tXHmqullxlXJZ/7hWdiIR3CDz4W4T7wfaYpRk+diOx/ZoHNb8FMlwy0BeGkuwu6GY= Received: from OSZPR01MB7004.jpnprd01.prod.outlook.com (2603:1096:604:13c::9) by OSBPR01MB3397.jpnprd01.prod.outlook.com (2603:1096:604:4c::10) 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 03:08:35 +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 03:08:35 +0000 From: Yoshitaka Ikeda To: Mark Brown CC: Yoshitaka Ikeda , Philipp Zabel , Pratyush Yadav , "linux-spi@vger.kernel.org" , Masahiro Mizutani , Ken Kurematsu Subject: [PATCH v4 2/2] spi: spi-cadence-quadspi: Fix division by zero warning Thread-Topic: [PATCH v4 2/2] spi: spi-cadence-quadspi: Fix division by zero warning Thread-Index: AQHXee/dj3Pe0gvgLUKcPSxBtVG6Cg== Date: Fri, 16 Jul 2021 03:08:35 +0000 Message-ID: <958bb93b-db83-b685-5fa1-8e5dc40a5975@nskint.co.jp> References: In-Reply-To: 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: 0c1947bf-34af-4ff1-6c44-08d94807004b x-ms-traffictypediagnostic: OSBPR01MB3397: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: 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: 9oh3A/ivA3ZmRQARYrwOlj9ZgzOoQJUmMmr4hwrX6YPxomqL/JNpQfRJn8qrAD7ivvMuFM09LAEaPe/UBc0eYcUachyQ5xoQA2yFBvgdjiBgKXWPks5dbRJZmoxJ2KecyoHCzFuGy/Fs3CZYflWST0RJN3YUWakG18u9M+yTkjLbbSPfzQXSHhGV8PELS2oIWqo9TY4aZ9u9v9sBKUFq61RZGaBPEp5fovqDHLHFCCA/oqUPPetCjB+a18kXKkHxledpuFKyR2FI/9pI0b6uoTgGX6D69A6vxC2q+s/GeIeBwGyeBrdKTC1eotXCyjUeCmj/VZSPNx10nB7BjU1IeoDxGGckcTePPzKUZyahMzYhtOOstR+hEjr2f8lxmfRy1GBZcyaiOdVdy2+7a8Jl4+qR0f0pmgkk760hC72467qojrz8nAcD9q3aT/vMnu6njtJ2FYYdLQRiazULlW+cYXQv3EICIkuZOvsciEpbhV3IXcnwwE7t6aUXcxbTH53mpR4jvX14S8GEMF1dTVrdVnvRMlZg0yjj8T69ZWryw12arZ417YQbi8rhhFPxvlpfs/sF7AtlCK5Wd47u+Zzgleb3jmuQKuBoiF/ZxtjDSmMmcSKgcCr2YEGf5kbZ9G2ZSWpnaDTVfcP5jXxVibnEQ4+uvoOp9+8jNH1WuxoJyyOS9/JTGcEh7dOdpBER2Kl4UguKdfeOttIojSj223iLFbWRLefz2EZ217PNAoApG1JaYgje8xVWd+uz1M8vCh+f9kBXlsFX0u0kJNbrMAXrTg== 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:(136003)(396003)(366004)(39830400003)(346002)(376002)(31696002)(86362001)(26005)(83380400001)(54906003)(6916009)(107886003)(76116006)(6486002)(64756008)(4326008)(6506007)(6512007)(66556008)(66446008)(36756003)(8676002)(316002)(66476007)(2906002)(31686004)(186003)(2616005)(8936002)(478600001)(66946007)(71200400001)(122000001)(38100700002)(5660300002)(45980500001)(43740500002)(38070700004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-2022-jp?b?MkxGeDZ1Z2x1a1Rj?= =?iso-2022-jp?b?M2pGUU9SS2FoSWpLdGJpcHhubXdSSURuVEVROE1sejZuelNv?= =?iso-2022-jp?b?OHVMbEFIc09XalUvVnRWYzIvazZoN29NNnVnc1kzL3NQbnVp?= =?iso-2022-jp?b?ZTZmcnk3NmIwRGtZUW1GNThHNXFQd1NnZTZzeUZndUFYY2lw?= =?iso-2022-jp?b?NGxTSkZ4MlM4VkovTVBWMFhvK2psUkluUGRQUEdib1JvQmRs?= =?iso-2022-jp?b?dHJ6dm5qN0NlRnBnQXdCOWxSWEpydFRLdW5IVDN1U3ZiWTht?= =?iso-2022-jp?b?bEtHcXB1UzlUK3d3ZVFYbEpRbStpNWM5THVma2lPa1Vzc1BJ?= =?iso-2022-jp?b?ZDFrMDY3M25UVk1yMXEzVk5QOWJqL1lMWWNuSlFsek1ydW0x?= =?iso-2022-jp?b?SlZQZUZJSnI0YnAvbEs0S1ZkK3RWWU5FcHNmWE04aEdFVFdk?= =?iso-2022-jp?b?QjF0SG1WNUhGdEdyTU5WQ3BuVzVMZmZUSFpEbUVzdElnQVRG?= =?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zSXNWT3FWZ2hYejhj?= =?iso-2022-jp?b?MzBsT2pwMkhWU3lQdS9BV0NuRVh0enpaUVAyV0NXM0s2dFBx?= =?iso-2022-jp?b?TDM0amwzK2RsaDZ2NmhSMWo5WFk5YjdGeGVhZjZWcC9OOEJi?= =?iso-2022-jp?b?ZERHWTZtRGM1eDNzTFpyQUFxQ2svSXF2UFQwdTJ5KzdWK3JR?= =?iso-2022-jp?b?ZUJpczVJc3ZETUVDZzA1bElVOWFXbzFZSFZaWkRRV1JlWkZa?= =?iso-2022-jp?b?NkRuVzBibUR5S0lTcVBFQmljSEpaQUZYYjVvcmhVSFU5TXJS?= =?iso-2022-jp?b?S0w3THRjOUZmL0I5QnhTZGdTV0g5eWFYYkF6WlRZQnJwWExr?= =?iso-2022-jp?b?TXB3VnlQeUpTZmROZTFtMWtMclRNa1AzNG5xOU9xQS9kMHJr?= =?iso-2022-jp?b?N1lLYmJQYUZIMlUrSTZmUXN3djI5T2w1a21oY2Z6djRjT2tB?= =?iso-2022-jp?b?dE03Ymk2TWFwOWxhK0c3NGc0RG1tZ2hHbWFyUjRXelZsNjhV?= =?iso-2022-jp?b?QmxJWnV2dkJXd0p3elRGR3hKY2JkR05vY3BySFhESXJlZE0r?= =?iso-2022-jp?b?M0MwQ2Z3MXU1QkczdkpIVy9tOVdzd0RtZXBwRXJrOCtjSStt?= Content-ID: <1BB8864EDF195B4EADE99CDAAE482F92@jpnprd01.prod.outlook.com> 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: 0c1947bf-34af-4ff1-6c44-08d94807004b X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jul 2021 03:08:35.5693 (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: WXlPMaR9oEH7tSlP29L2/fLMbd2C9vZU70g1XoKeqj/jIupm8FAgw89OD+BQM90PVsZ8BefgIsEu227KuEs4BQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB3397 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Fix below division by zero warning: - The reason for dividing by zero is because the dummy bus width is zero, but if the dummy n bytes is zero, it indicates that there is no data transfer, so we can just return zero without doing any calculations. [ 0.795337] Division by zero in kernel. : [ 0.834051] [<807fd40c>] (__div0) from [<804e1acc>] (Ldiv0+0x8/0x10) [ 0.839097] [<805f0710>] (cqspi_exec_mem_op) from [<805edb4c>] (spi_mem_exec_op+0x3b0/0x3f8) Fixes: 7512eaf54190 ("spi: cadence-quadspi: Fix dummy cycle calculation when buswidth > 1") Signed-off-by: Yoshitaka Ikeda --- drivers/spi/spi-cadence-quadspi.c | 3 +++ 1 file changed, 3 insertions(+) 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;