From patchwork Mon Mar 20 23:49:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 72554 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1513335wrt; Mon, 20 Mar 2023 17:36:38 -0700 (PDT) X-Google-Smtp-Source: AK7set+1SraC9lUsUkTYjRJm9N1BVyoVNXEi0Cs1b9z1NpcwjkMIngzSRmnIyu/tZM95ImjE/iqZ X-Received: by 2002:a62:384e:0:b0:625:e192:1c7f with SMTP id f75-20020a62384e000000b00625e1921c7fmr641359pfa.18.1679358998334; Mon, 20 Mar 2023 17:36:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679358998; cv=none; d=google.com; s=arc-20160816; b=I4l0ckT/GebS8wVSCKWxZfCwbT0eu/bS8qtjhLVD0B0gd4I/MZs+ytbYP9WNSdNq5h Js8O0SPcWy7+3RcoSoO1tz3Tp/B8sGTJIjBcTYweLxi/0I9ZMeIElo1+hhny7UlSVGgH y3rfGRDiDazZtJ7dElthKnNNOV1ng3r0rUbhpLZW+VYVlv+YU/g98Z+VwsKjXiWEc/KL OcUTOUx77J5CYVJJzhbJy+GnshQ3lSQ2aFiyrx5fpSo368oWIpegVqOjFUY82jTOUzuC /2XIz8axrHDneOBNQNZqpm2EmSDZ8JCfMtLViw/5v1uaR8lnHB0Bk1TXphTDNxXpXcEn psxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=dzrLAVGbWNN8AGVBKViLJqvzv9bGR8wwpK1Vk6d6ayk=; b=pev7uLujlq5UxHAI6c7PO63MOy9d0Vasu05bJfWEbrob0xAzZqCuFLsmRd0zixensb 44xKt3ICxvpRi75w+ivzWVnaneuDavwnMSGXUZsCOTmN72NCVk0UtFpBnByM5327CUWa 6B3gx17frRogdDJR7d65CQKZiEPh0nxAkKwtaeo0bY4xv2SxyOahZ2LZG0V8AUhZagyx 1gMD+aTPDqyyszLdIujfMcJBXbzSOZEq2lYLcqXWD+wfmyTHcUaE2K2h/HGm81zNJM/U kWYh1uJ1WrzD2Spe2V4qhzclsKXoUsRL57O73cLersvolKisCtY9sNJHbwcKGwTJZNsD ucDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hwCpnBu5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u5-20020a63d345000000b004ff6fe5b263si11615145pgi.749.2023.03.20.17.36.23; Mon, 20 Mar 2023 17:36:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hwCpnBu5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230196AbjCTXvh (ORCPT + 99 others); Mon, 20 Mar 2023 19:51:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230135AbjCTXvf (ORCPT ); Mon, 20 Mar 2023 19:51:35 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26A4A26A9 for ; Mon, 20 Mar 2023 16:50:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679356157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=dzrLAVGbWNN8AGVBKViLJqvzv9bGR8wwpK1Vk6d6ayk=; b=hwCpnBu5F5P8o+IGHVMszSjGMPyE0wz6fw4cPMNSFg2hu1Us2WRaXV9PLGqh06G6PdZKCX xeI3EkRZ1CItph5joerrBCZlL2W2YPkzlnHzT3CRuvFIgDfP02JuHD5dtIvG6Jq74sCsDq ony1gP97bqi3s9bEijdWBHSIiBP6dQE= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-504-_QT_GX2MM9S05aVFlldNOA-1; Mon, 20 Mar 2023 19:49:10 -0400 X-MC-Unique: _QT_GX2MM9S05aVFlldNOA-1 Received: by mail-qk1-f199.google.com with SMTP id oo24-20020a05620a531800b00745d671f9afso6179650qkn.12 for ; Mon, 20 Mar 2023 16:49:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679356150; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dzrLAVGbWNN8AGVBKViLJqvzv9bGR8wwpK1Vk6d6ayk=; b=QCvx5kbimPJrYR2MyiO2PEzP6sQadR1AIf8oIQW5TTAvG5dpU7y+wVpdj8Pof0KvDK hgLw6FaZwkPetIVpONB9D5WyCnR/jwO62qIdNCTssJoY482KJUgRL+UY/z6txPGGFKts wbO5+gq4rg7NYKz/6wHD5A3OYTiqEl5ooYsiwsDHmVVTPl1KVJN4R1ii358ychWZ7+dI 7hEq0Tyn4T6lAtOf7wW61YyL6PBzAmqzsvbE1QWwMfQqzYYl0pzzTBEQr9oPUCDTmN3R CUXsmNpFbE7WYZPkcVbf5TilWjChHhgcVkCtBp3C6WQULRc1xSzsjHeRFX0aJWEun2a+ /wCw== X-Gm-Message-State: AO0yUKWumAAq+sAqCY/foZN5OfJ4l+HwFquoXxKubCtr/UCJbwIOEPRM w6A3jBxfHGLEf360pBhiK0XNTZLrfOpyJKcZAJfBNe8fdBTKcH2+4kxeFvC+x8grB1Z8wNUThw+ xg32LESfWRNnebhAs/P26e7Tl X-Received: by 2002:a05:6214:20c1:b0:5c7:d03c:f2b2 with SMTP id 1-20020a05621420c100b005c7d03cf2b2mr1237648qve.28.1679356149795; Mon, 20 Mar 2023 16:49:09 -0700 (PDT) X-Received: by 2002:a05:6214:20c1:b0:5c7:d03c:f2b2 with SMTP id 1-20020a05621420c100b005c7d03cf2b2mr1237632qve.28.1679356149549; Mon, 20 Mar 2023 16:49:09 -0700 (PDT) Received: from dell-per740-01.7a2m.lab.eng.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id g2-20020a37b602000000b0071aacb2c76asm8104474qkf.132.2023.03.20.16.49.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 16:49:09 -0700 (PDT) From: Tom Rix To: gustavo.pimentel@synopsys.com, vkoul@kernel.org, nathan@kernel.org, ndesaulniers@google.com Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Tom Rix Subject: [PATCH] dmaengine: dw-edma: remove unused readq_ch and writeq_ch functions Date: Mon, 20 Mar 2023 19:49:06 -0400 Message-Id: <20230320234906.1730308-1-trix@redhat.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760935541093267741?= X-GMAIL-MSGID: =?utf-8?q?1760935541093267741?= clang with W=1 reports drivers/dma/dw-edma/dw-edma-v0-core.c:162:20: error: unused function 'writeq_ch' [-Werror,-Wunused-function] static inline void writeq_ch(struct dw_edma *dw, enum dw_edma_dir dir, u16 ch, ^ drivers/dma/dw-edma/dw-edma-v0-core.c:185:19: error: unused function 'readq_ch' [-Werror,-Wunused-function] static inline u64 readq_ch(struct dw_edma *dw, enum dw_edma_dir dir, u16 ch, ^ These functions and their wrapping macros are not used, so remove them. Signed-off-by: Tom Rix --- drivers/dma/dw-edma/dw-edma-v0-core.c | 56 --------------------------- 1 file changed, 56 deletions(-) diff --git a/drivers/dma/dw-edma/dw-edma-v0-core.c b/drivers/dma/dw-edma/dw-edma-v0-core.c index 72e79a0c0a4e..32f834a3848a 100644 --- a/drivers/dma/dw-edma/dw-edma-v0-core.c +++ b/drivers/dma/dw-edma/dw-edma-v0-core.c @@ -159,62 +159,6 @@ static inline u32 readl_ch(struct dw_edma *dw, enum dw_edma_dir dir, u16 ch, #define GET_CH_32(dw, dir, ch, name) \ readl_ch(dw, dir, ch, &(__dw_ch_regs(dw, dir, ch)->name)) -static inline void writeq_ch(struct dw_edma *dw, enum dw_edma_dir dir, u16 ch, - u64 value, void __iomem *addr) -{ - if (dw->chip->mf == EDMA_MF_EDMA_LEGACY) { - u32 viewport_sel; - unsigned long flags; - - raw_spin_lock_irqsave(&dw->lock, flags); - - viewport_sel = FIELD_PREP(EDMA_V0_VIEWPORT_MASK, ch); - if (dir == EDMA_DIR_READ) - viewport_sel |= BIT(31); - - writel(viewport_sel, - &(__dw_regs(dw)->type.legacy.viewport_sel)); - writeq(value, addr); - - raw_spin_unlock_irqrestore(&dw->lock, flags); - } else { - writeq(value, addr); - } -} - -static inline u64 readq_ch(struct dw_edma *dw, enum dw_edma_dir dir, u16 ch, - const void __iomem *addr) -{ - u64 value; - - if (dw->chip->mf == EDMA_MF_EDMA_LEGACY) { - u32 viewport_sel; - unsigned long flags; - - raw_spin_lock_irqsave(&dw->lock, flags); - - viewport_sel = FIELD_PREP(EDMA_V0_VIEWPORT_MASK, ch); - if (dir == EDMA_DIR_READ) - viewport_sel |= BIT(31); - - writel(viewport_sel, - &(__dw_regs(dw)->type.legacy.viewport_sel)); - value = readq(addr); - - raw_spin_unlock_irqrestore(&dw->lock, flags); - } else { - value = readq(addr); - } - - return value; -} - -#define SET_CH_64(dw, dir, ch, name, value) \ - writeq_ch(dw, dir, ch, value, &(__dw_ch_regs(dw, dir, ch)->name)) - -#define GET_CH_64(dw, dir, ch, name) \ - readq_ch(dw, dir, ch, &(__dw_ch_regs(dw, dir, ch)->name)) - /* eDMA management callbacks */ void dw_edma_v0_core_off(struct dw_edma *dw) {