From patchwork Wed Mar 6 09:09:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pi-Hsun Shih X-Patchwork-Id: 10840629 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F3E7B1575 for ; Wed, 6 Mar 2019 09:09:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAFF82D235 for ; Wed, 6 Mar 2019 09:09:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE0F42D239; Wed, 6 Mar 2019 09:09:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7A9FE2D235 for ; Wed, 6 Mar 2019 09:09:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=IkyB34gKNkATCb6s84OTxk9IN/8riIusauum2ny2wDc=; b=WZpN8DH5JXLSxs hapvA5DlN45+LWQYFXdyT1k4iIjObf2Alp1d3kbSNjJTnZUMufjdNE7/CZfvcV71wc0R2GqUL19zC 2pUijjhd8RO7rrteLMVJc5D0ox65xgiFnwUKU/pC6TtyLmvEz2H6oClzHips3J7rEN5PdJ2cTvI05 WRUdSK8GnrBSuX0up9503Pyx4s6mHEoLtPpRFXHNi9aaq9XRzn92N+rpSuDNW+csMZmrsbOo8NVte Qj7LDLNGlBTZIFvISQ4IS5/g0LkjI5lETSCEwNCFS9cd5bLhM12QWAhOh4xoZPLwdpV2L1KR9+G8P nFk3v7urYW9Qlrl3mprA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h1SYa-0000rL-D9; Wed, 06 Mar 2019 09:09:44 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h1SYX-0000qh-CK for linux-mediatek@lists.infradead.org; Wed, 06 Mar 2019 09:09:42 +0000 Received: by mail-pf1-x443.google.com with SMTP id u9so8077258pfn.1 for ; Wed, 06 Mar 2019 01:09:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=79l63kcqXmc25Kzf0CEDnWnX5vnRmUo9Cx6sRC5Sj+4=; b=TYePpk5hYtk7u634e/LJ7sQXvPICLPF9fzcwKbTZU4tiTR64l9GwO2qU+Of5hLYNu3 z6u0Z7chy1GtMQdkwlaXuVLWEaDV61CmPMl0yIxCQJWj+mUvitYwdsuz7wQq3ponzqeo 3gQxpQd2fLSFoGW4IxFOrEWqTK9/Z4fmKFEYs= 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:mime-version :content-transfer-encoding; bh=79l63kcqXmc25Kzf0CEDnWnX5vnRmUo9Cx6sRC5Sj+4=; b=jndN73kWtncHIVx087GkaNyNGckIQhSLj6KKFMhNEku5WhUD9a0hDbUKfGq3L526vw dfhuhRbmxrCNz9Dq9lKlNySHi4HkFa4vpMDQQs0trfKoRb0j1GFHdtDjS6FIuRl41E08 55y651nVuoETmjQFzLE0c3r3av3LDapEmdHnC2l9n2ruXM0MK55vhXLyQy2Ct+3u+10h 4n1GJvZDxbzjjelHMJ0XVgIdP+BWE9QCg/v9edOrwCRY2nawmv9RItkt9BsHW0FP4Q6x Ri9INzN2D2/utiA8trbJFRBCLBtc39riENtDiaZ1OjTA86FqMqTAWgveTvQiHs38XlPK pgdw== X-Gm-Message-State: APjAAAVZR83tgEra4VgQCI9HhzUqKQCcmKdNuqba1f2SPRsAfUg8zTQI EtAaRnqjTCqJLOCDwLQMG/pCYw== X-Google-Smtp-Source: APXvYqw+ibNtiwANtR95jlMMUbQKUNv8L8d6GDRvJrL1uLsWfFLDmb2lgL5HuDjLsz0atLGM09T3zg== X-Received: by 2002:a62:e0ca:: with SMTP id d71mr6198984pfm.62.1551863379887; Wed, 06 Mar 2019 01:09:39 -0800 (PST) Received: from pihsun-z840.tpe.corp.google.com ([2401:fa00:1:10:7889:7a43:f899:134c]) by smtp.googlemail.com with ESMTPSA id h65sm1603710pgc.93.2019.03.06.01.09.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Mar 2019 01:09:39 -0800 (PST) From: Pi-Hsun Shih To: Subject: [PATCH 0/2] Fix UBSAN warning in mtk-afe-fe-dai Date: Wed, 6 Mar 2019 17:09:01 +0800 Message-Id: <20190306090922.117634-1-pihsun@chromium.org> X-Mailer: git-send-email 2.21.0.352.gf09ad66450-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190306_010941_435106_842CBC43 X-CRM114-Status: UNSURE ( 6.57 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Ryder Lee , Kees Cook , Garlic Tseng , open list , Masanari Iida , Mark Brown , "moderated list:ARM/Mediatek SoC support" , Shunli Wang , Pi-Hsun Shih , Matthias Brugger , Wei Yongjun , "moderated list:ARM/Mediatek SoC support" , KaiChieh Chuang Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This fix a UBSAN warning on mediatek mtk-afe-fe-dai, and also clean up code to prevent new config introduce the UBSAN warning again. Pi-Hsun Shih (2): ASoC: mediatek: Fix UBSAN warning. ASoC: mediatek: Reduce repititive code on mtk_regmap_update_bits. sound/soc/mediatek/common/mtk-afe-fe-dai.c | 51 +++++++++------------- sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 13 ------ sound/soc/mediatek/mt6797/mt6797-afe-pcm.c | 16 ------- sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 16 ------- sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 20 --------- 5 files changed, 20 insertions(+), 96 deletions(-)