Message ID | 20210406113306.2633595-14-xiaoning.wang@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=1rdH=JD=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@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=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 727C1C433ED for <linux-arm-kernel@archiver.kernel.org>; Tue, 6 Apr 2021 11:40:50 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 D100A6136A for <linux-arm-kernel@archiver.kernel.org>; Tue, 6 Apr 2021 11:40:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D100A6136A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=oM52Eux99zAbIEI92vGQPH9poQMUoYkglfjKqRoqC6o=; b=OjfiHQnq5UPq1NqF10f6wnGRh J/CXPnzd3gMtWE8XTEgFQT7VVIJ6BubH7e64CwpPemrMVzYmROblIOICJmwebeidOvTJoaM764OPk wc7gdqAbkS+Q+ihxvi5MWeIlK/Z+FPVBZYmnFLL3YGVKOahKPBFFWkhiYSBUku2QQJKPENIOUX+Jw n1/hC32oRS0t5GC9mIjB9CiyesG+0OU2CHddYCGFiB/tnSEVLObI59eo06GkyZuk0NsHFGiDJSz6u LLb3EBIwjBDl8/wfbp24U8/YRUEj/EVlMqHPsmx/2kUkG2psncZF/KidJkXG8GwhZ60EDUAPeJssY bOXi7ILfw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lTk2p-002O99-C1; Tue, 06 Apr 2021 11:38:55 +0000 Received: from mail-eopbgr150073.outbound.protection.outlook.com ([40.107.15.73] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lTjxq-002KzK-DW for linux-arm-kernel@lists.infradead.org; Tue, 06 Apr 2021 11:33:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gS3K5hu2xX5QDAS+8KSUY87mAf9eTrjiexwdCqVFhiBE5XvmCwMc73CxavNQbwr/dbpdDFiAgQzp5m179JgioyBbJsIHTNhAc5NfC9OcSW24WtXcOWHhHp04N35fHhSQEhonb1XCFwEn2cFc3GaEGEU1n2w2zTGIRPbFugi+ay+/4c5yNtJTnNBthd+x668l0Qyhwx05bdeQwLYRUvX2F+7I1latqjhYMf+4HwVztZ0hDUvovtqKXyWbLXLsAgpw9NDD7FVdhK8nq5C4rP+1WRQ17TMqg6Uf0/a7Tmu8I2YyBG71YGoX1rEtM2jrz4rmgo91BYuWjPk+FbU3Nyl/fw== 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=z0DJbMGP5jtQt8jmC7BVVzD6nrFLd/WlXnJLdGk67fA=; b=oOFxnOdN7I4vcpvnXKgKzqiOPGsfVJuH8Xqmr0sEi0EFZGKmVw+YbxAyz+LXsVmOoXEGqMY0nT4frHqbRachrDmKOTqJ193yA511UB7fx9XoIMqlzG3u2jTqPEzat3v+afG67Z9x5Mkq+XskVncV4G3DUDFw14WZTLrY58oVJ4ChpT+el+g5G1DNIvdti+J7kRrjXpVlHcl9Td5uMRSmrfDRt/oqD/Akx+VavNgYqOb7JgLttb9z8s4xDi8iSXtR/M7E2UKbiqEGyaN8/ZdMOSxp83LESuf0m7AGXU75tprpev9Ph51PAcFqgtl1ueekS1JpiWJzoY7PGGXFujJx+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z0DJbMGP5jtQt8jmC7BVVzD6nrFLd/WlXnJLdGk67fA=; b=gO8zaECKHbutYwUyWMODF6CMgagPGCYPAI10LWSUNarNocqqCAA/BXFm9zckiA0igRJfiyRNpkVUOeX8kBsEnJVCUP3x6S2zui1lQy7rOhbw7mmpfc/m6K+ptlmw24x+RawwyBDMeCH+7Kv9Q57qaIpQZOIFwhmQ6q8hEu5SpSM= Authentication-Results: nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB5623.eurprd04.prod.outlook.com (2603:10a6:20b:a9::13) by AM6PR0402MB3765.eurprd04.prod.outlook.com (2603:10a6:209:19::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.32; Tue, 6 Apr 2021 11:33:44 +0000 Received: from AM6PR04MB5623.eurprd04.prod.outlook.com ([fe80::5cd9:3da7:144f:36f9]) by AM6PR04MB5623.eurprd04.prod.outlook.com ([fe80::5cd9:3da7:144f:36f9%3]) with mapi id 15.20.3999.032; Tue, 6 Apr 2021 11:33:44 +0000 From: Clark Wang <xiaoning.wang@nxp.com> To: aisheng.dong@nxp.com, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com Cc: kernel@pengutronix.de, linux-imx@nxp.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 13/18] i2c: imx-lpi2c: fix type char overflow issue when calculating the clock cycle Date: Tue, 6 Apr 2021 19:33:01 +0800 Message-Id: <20210406113306.2633595-14-xiaoning.wang@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210406113306.2633595-1-xiaoning.wang@nxp.com> References: <20210406113306.2633595-1-xiaoning.wang@nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: HK2PR0401CA0010.apcprd04.prod.outlook.com (2603:1096:202:2::20) To AM6PR04MB5623.eurprd04.prod.outlook.com (2603:10a6:20b:a9::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.71) by HK2PR0401CA0010.apcprd04.prod.outlook.com (2603:1096:202:2::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.27 via Frontend Transport; Tue, 6 Apr 2021 11:33:40 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b24d3e50-0d76-4d8a-f0b5-08d8f8efd59b X-MS-TrafficTypeDiagnostic: AM6PR0402MB3765: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <AM6PR0402MB376560432E92B35B5CC7EDB5F3769@AM6PR0402MB3765.eurprd04.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:1284; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /PDyrBOmssV35Kqpvb+4J75Y7uTev3Uat5aJd3uyKtJa/QKGn8lOdnnOKHn/hOE+77xek1szeUlI2mum6iM5EKpGML8PzIyw3bGEPHX5rJdxwKBPa5hsoLn3LanjO17vqtfc6cxgHpEhlbjQ2IVmHn6EPoQ0gd2EmIdexA4h4wpvCAfx7N8ZN7Ygb9GU5ANVuQ06jMGh3vvhThzy/S2+BXAuP3Ot+zSjQgmm9/3eIJramRu752mTjN0wW+WA+H4I+R8cqFMC1NKim5JTBP1aR5h3S/GkIhS6+XtIznwUSEkxribkkjbUKSY5a0EG2xbvfdaVtccPq09Dm20HmilAQwyLPs17+zxo03K0iTaGjrSgyt0JiUn/tTDSU3yypJaH8LyisKGupIM7y02daAtpRmZFpZFuumfUXGawNhfHsqozE9ARy86PqtMxMUXwLhkJjQ4Yu43LGllkXWuXSLuT4+c2RgTy6IyLhwlMuZxvULIMUpkhBKDDzShuEjUQlYPXFA3QwsXn26chPtEAK21uI+zTp10630mXsfPn8rMDBva6Mx7CTj4lB823cKNkZTEbx3Lld1lukUnSPOajtaS0E8+2QFIw9fRv3j8zEwTDAHcen1WPi0x5ZL+FAeiuElHFqSlGDnmOqEqmDuxufuYo7Bb6FZDKd9saV/kHtz2xgCQB+o4m+Isl7VMP5chn5KHkDK1V4C9E3Av/xXI5MY1VBw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB5623.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(69590400012)(66946007)(36756003)(6666004)(38350700001)(66476007)(66556008)(498600001)(83380400001)(52116002)(1076003)(26005)(38100700001)(4326008)(956004)(16526019)(2616005)(186003)(86362001)(6506007)(6512007)(2906002)(6486002)(8936002)(5660300002)(8676002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 6umrCu5npt5Meqb9QbGL/5VagcqBgQznm4R2WPWMJQIccIwQoHnp24e2u2k7r+7dHZeGhQ4FSsHOcUjzppubxfnj/EB9FqRIE/Lh232XwYBv1MLqIvCU/dAns8UePqFxfaBcN4whPzeIr6SYBhWL+h6O7xRMjANjV535OjvOHUGylPaEW77dl5PnPMDM6DDnN21vxBmSvcZnoxmwFEx7Eev7M7cqU4+rd8ersUpgF+/xmUqc1uWyHBPA6+o8Vo8+Cur0dQtiRT1ovYo46vzpGwOC+Y96eWOQvs9zc9kOY1uJHiUwCc4cQlzr0K3OUI78qgp6kMLjRamDAJFL31nqXZPdU8KfFBMA1n6byBTHLhlUSZ72CdjVEIeOTozCmrkwAUHSaWoWPqaTta+DKB4deRg2z8UWD4iCv8MO07Ra6c8vXIbhBOOAC+26q+jUyCJ1Kjoj2rIZNGoyJf2Cb8fBWwAsaLjBaZiD2QfWQzfYukgMwYtgD7L5iX0milQrxLPNqP8sjZ051o9X9wq3RPLXJ46LO1QQp0B39tdeWwjjCGBW/+lRU3Hcszz6FHRObuNAtA0mPOwY3ZTbyn0EOdsDDTcEBELLtPNkF87xyXNwblXfEUsHO5rTPjSH7EX5ftpiOTwE6p8dI80uuud2dNTwxXcDvSfIrMvZA4NfMyTl0Opk4yXI2LgK+0mctg8/Hqk4Y4dxZKAhLqGIEt+uusuIfdCiNmsIZKBwKU2FQqu00AHelpRbvSMQZDblYBJKaSNWlcQ/9f+elNwQaGkJpVFMwkA4h55yW5BnRwNsna9SztKSJdqMtUxxNlPukjtYQxhbgBEuxP4TxmNtOv+bzspGUC7NMvVYy2Uj/b4MFwK3um5uLd4Sd9TcB9ylodtCKmxhON84DmgT1MXDuG89ivwEkC8cC4owSvKDYTx2ZZ+N290ATjXyuhB85koSC+nrTx53JPaIQ2w3jZ7TT9p5I4dfgr9OAZjrmcc2C0XOvaNloIZmZY6dUS4n3d1/bHBd7fmxumyZwrFhw/pi4JVtb9FdU1NspOM/fuy2DWb0ad3915g9IU9jWxABVxSwEYwy/d9fPzSxnRl8ATP6ueuPqsN8FSrS9vL1cr/BQGUMMrxd4//GTLDUT+dHpPfNgKvyRi/ViTYcP778SWH+NdaTQCsZ8X5+4DPKT8l0gxR+WjB7aGa+WMXErHBYqRt2hzdPA2etBL4rTW8gGlPydiYQWnhWOCNhBSUtDp4fYZ7phmsKI/u1U3vMmZ+uFRPhoV+hS3rGgWzUz1Wk4Z83JUny5PxozhR0UIgKtCP0tFGiLhMWlTTtsFQGmIM7fiv06lt+w7zn X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b24d3e50-0d76-4d8a-f0b5-08d8f8efd59b X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB5623.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2021 11:33:44.1132 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BFo7ad7xsZCViapz7oVu3AVRJlljmTC0yC7L1u9BWWEipzrg2ylXcZc5I2A4gFiNN2eKYfxR9CW4z2Iiz4AIhQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3765 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210406_123346_656921_6CD34A5A X-CRM114-Status: GOOD ( 11.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
i2c: imx-lpi2c: New features and bug fixes
|
expand
|
diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c b/drivers/i2c/busses/i2c-imx-lpi2c.c index d124c4000823..c2f8e49660ea 100644 --- a/drivers/i2c/busses/i2c-imx-lpi2c.c +++ b/drivers/i2c/busses/i2c-imx-lpi2c.c @@ -213,8 +213,8 @@ static void lpi2c_imx_stop(struct lpi2c_imx_struct *lpi2c_imx) CLKHI = I2C_CLK_RATIO * clk_cycle */ static int lpi2c_imx_config(struct lpi2c_imx_struct *lpi2c_imx) { - u8 prescale, filt, sethold, clkhi, clklo, datavd; - unsigned int clk_rate, clk_cycle; + u8 prescale, filt, sethold, datavd; + unsigned int clk_rate, clk_cycle, clkhi, clklo; enum lpi2c_imx_pincfg pincfg; unsigned int temp;