From patchwork Mon Jul 3 11:30:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 115325 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp474036vqx; Mon, 3 Jul 2023 05:14:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlFgg1+8CyOE+llytuYqZFHjoVnhWE+Cpmvrezi3pFK9Ghq//U+2mYpiJMIMbMKaesLzvjBo X-Received: by 2002:a05:6871:720:b0:18e:2bb2:3f95 with SMTP id f32-20020a056871072000b0018e2bb23f95mr9373575oap.4.1688386474048; Mon, 03 Jul 2023 05:14:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688386474; cv=none; d=google.com; s=arc-20160816; b=u+cFYlwSDmkgruHiLNeQlVxM/O8UjQJBpobZax/J9yxlU7+wHEwxzNqbiMCoBc22XI y3dyXAX8UtcYm9IbSb4RhiiseHC9j+tFVrWOvQo/+SUAiCQxPZsFmr+2I9Xb4G/djTcE pFmvb8ss6D3aUoD0vF1tpqz81dnaukekjejOvDIwFWKhtSXsd4aM9MN9ORY2yPG2tnzK n8b95op7gcGkvRnLKtVFAOJi1SDr+8dh03TZmj/+8mFgNbeKepoliBvJ8SzPL1JSEZPB be4rqjCpVA/WJMAC1Ca9Tvm0IEuuvYEmkpZdlpNvTu/JZ50qEYmmorfB02JYsJPe1TNa +5bQ== 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=m1Vcfj2ZR0Ju2g8J/oLsKnVNHrkLZS0A5xwOFXsgdAM=; fh=lrqL+8uJ0Rko0OTb2KtmRObJnbiLwxmpEy07ZcNtHcc=; b=jNjSTYYwd2tXmQPvOsH1pwkUX17YniZwJCR7WC2PqQQx1ohE7DpbN8VkarVeMLKeDH NgvPEJPDrucTqfhvJ5u212B1JxdTrK+lBJZiqpz6yMje9cdEETNyJw95lFtCWeaOW5RU 6qSNjynFMYqAMiNUutrJNxW+mzzd4mgcdUSTLldd/xWLDmZ1tnqNTUtKKXjR574C+zIC rjG9kqy9UHkdEJ9Fft7R98OGtKeou2ykyOvVKf7AuepmFXn9l3qCm9GzGHXk7cesMd6m xb92La+o/8h3uuwk4JKEJUTxKUJGTSNH9jUS3/4m49703tWwMDvu/uvSw/gFeljyq2Hd U2Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JGYuRaq5; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n3-20020a634d43000000b0054fe372aa7bsi18010297pgl.609.2023.07.03.05.14.19; Mon, 03 Jul 2023 05:14:33 -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=@kernel.org header.s=k20201202 header.b=JGYuRaq5; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229954AbjGCLbW (ORCPT + 99 others); Mon, 3 Jul 2023 07:31:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjGCLbV (ORCPT ); Mon, 3 Jul 2023 07:31:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9E82B3; Mon, 3 Jul 2023 04:31:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 669F760EC2; Mon, 3 Jul 2023 11:31:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD31CC433C7; Mon, 3 Jul 2023 11:31:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688383879; bh=4dMz6AICQADVRRk6AU4c36ys4TXGNzy34CAOZWE5z1o=; h=From:To:Cc:Subject:Date:From; b=JGYuRaq5gZfzOX8EqTv+gxLLWUN2XdBFw6I4bM65b02eU9FLNa05+EkPbuIM/w/0L KKTu7s2hACooo45t5NDtM88Rdku73L7/D/1UNqwCFiT456JhYx2FO6FLHa2zAdQXk4 kBYM+1lb9c7KI7X8CAO+I/L6fuxTwIv5D8kBj4byiLVWnJR/Y+9kCcCt/CZSdG19TK 6u0MLr5Qpf3fIrA27gXgGb+rRYtyqDcI2T4SQ7j6UslQf0KizBMVMnA9OEbppJPDLf SHVBr8s4T3LmNTyYyYLytU73cOIVLW9itW3Pxduydln2eOH0/4tsmDNlAFniXdwStT DMbLYPeHBgZ9g== From: Arnd Bergmann To: Marcel Holtmann , Johan Hedberg , Chris Lu , Sean Wang , Jing Cai , Abhishek Pandit-Subedi , Manish Mandlik Cc: Arnd Bergmann , Luiz Augusto von Dentz , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Brian Gix , Pauli Virtanen , Iulia Tanasescu , linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Bluetooth: coredump: fix building with coredump disabled Date: Mon, 3 Jul 2023 13:30:48 +0200 Message-Id: <20230703113112.380663-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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?1770401535351730766?= X-GMAIL-MSGID: =?utf-8?q?1770401535351730766?= From: Arnd Bergmann The btmtk driver uses an IS_ENABLED() check to conditionally compile the coredump support, but this fails to build because the hdev->dump member is in an #ifdef: drivers/bluetooth/btmtk.c: In function 'btmtk_process_coredump': drivers/bluetooth/btmtk.c:386:30: error: 'struct hci_dev' has no member named 'dump' 386 | schedule_delayed_work(&hdev->dump.dump_timeout, | ^~ The struct member doesn't really make a huge difference in the total size, so just remove the #ifdef around it to avoid adding similar checks around each user. Fixes: 872f8c253cb9e ("Bluetooth: btusb: mediatek: add MediaTek devcoredump support") Fixes: 9695ef876fd12 ("Bluetooth: Add support for hci devcoredump") Signed-off-by: Arnd Bergmann --- include/net/bluetooth/hci_core.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index c0ca3f869c923..491ab83ccafc9 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -593,9 +593,7 @@ struct hci_dev { const char *fw_info; struct dentry *debugfs; -#ifdef CONFIG_DEV_COREDUMP struct hci_devcoredump dump; -#endif struct device dev;