From patchwork Tue Jun 4 09:08:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Kellermann X-Patchwork-Id: 13684915 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB896C25B78 for ; Tue, 4 Jun 2024 09:09:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 31A876B0095; Tue, 4 Jun 2024 05:09:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2793E6B0096; Tue, 4 Jun 2024 05:09:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0A5D16B0098; Tue, 4 Jun 2024 05:09:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id D89856B0095 for ; Tue, 4 Jun 2024 05:09:12 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 9A731A0981 for ; Tue, 4 Jun 2024 09:09:12 +0000 (UTC) X-FDA: 82192632144.02.A37EBA4 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) by imf20.hostedemail.com (Postfix) with ESMTP id A8EE41C001A for ; Tue, 4 Jun 2024 09:09:10 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=ionos.com header.s=google header.b=YCnoUSMR; spf=pass (imf20.hostedemail.com: domain of max.kellermann@ionos.com designates 209.85.218.47 as permitted sender) smtp.mailfrom=max.kellermann@ionos.com; dmarc=pass (policy=quarantine) header.from=ionos.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717492150; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=TwZhGhfqKNwGAAazIH0NZHq5xaKIh/aom8Ka+wD6k0o=; b=v1hul8VC/QsHPeld7n7Bf2/v/2URo3OZNBK17D+vJ9m01fR9q0TO3kPxJrfpfbbmYk8nD3 VvaP8VZJfq+Jdr322NGc0/czdNr+4X+MHKDtSsVpcNH+GUnuSHTYfENNM4/yuYd5i1IKaG PcT4VQPXeD0LNvVwicYu2Hu72juR2Xk= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1717492150; a=rsa-sha256; cv=none; b=xm+dfvoPqwmk2oWE4IAPjNoDmemq8B+qneTZSKfZybo0g9k2loJmLINrSjB0XylFntQYkb 2/TFVSQLhxH3Z6PGc3+zBL3TdHpqF9VF6tJ1okJVoDU1qXJ1URMsGjWVLbJP6Q9hDvHOK7 K+dn9iq4sIaNpuKjcLtqIaTk7al0kOo= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=ionos.com header.s=google header.b=YCnoUSMR; spf=pass (imf20.hostedemail.com: domain of max.kellermann@ionos.com designates 209.85.218.47 as permitted sender) smtp.mailfrom=max.kellermann@ionos.com; dmarc=pass (policy=quarantine) header.from=ionos.com Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a6341cf2c99so583459466b.0 for ; Tue, 04 Jun 2024 02:09:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1717492149; x=1718096949; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TwZhGhfqKNwGAAazIH0NZHq5xaKIh/aom8Ka+wD6k0o=; b=YCnoUSMRU5XfBD8nOTYV7I0gK6C2uAI0Mig1cvYhJbCTd+UcRlCnrqeMdB79l4sJgL AEkPtr9FN/0WBCtcU9S7XxdYYJyM0K1TgO2l8L0o7aFHOozOGXomiOsoGON4EJdvrmh/ p4WecM3Dz4kMxNtT8onZZFgEr2y4nHdhUC2Pz0vQi8yvYvGbBbFKpg8ld4QNz7s3vov/ jCUFhnEy10/iOi87sBdxpmePkCt7Sx9JWHKao6E/c077Q9T4XoubR/s4OxbmXgLfCdr9 jyR89tJe1DAiLF+eP4KqXBI/RCO8ysNI8CdLVtlTT1ZrwiW14DXfn5w4MRwS+n7Rzuhx Ke5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717492149; x=1718096949; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TwZhGhfqKNwGAAazIH0NZHq5xaKIh/aom8Ka+wD6k0o=; b=bCkGyZj/QEXBOdm3phARlkn2kk+CBGudNuUtZ3AsyodkYv22ILGZX6qQGrvlPoa5KR bbYiCw2908qeEu6CBKDwmhQGnlOaO64rx90+gni9FWjm1DMprE5RVC6JOVC1qD/9JOZB zlytQQgMIta4wVPHWJg6XehO5Yd2p4txWd/VFYOoqqh0IP6t4SCIUqwRv8Dh9bQY+AmE i+kWBM2XjFOy0I6LBrpqdM0AJF3Gki9GMaVHW01IIysPCmXNAjax2bQc/sZ/OB2Cqydu /djeHelK8zZkiyY0ttET6+sgLuccyi2IX4ZpKaGk3CN71sJ9KgItm53YtaqgSsilwvBj QM+w== X-Forwarded-Encrypted: i=1; AJvYcCWhRlhPVW2XXiL+cXkc+aMjZ9B9/fElm5OAyUz+OQAy3gttGeuX4eCMCsjCnlC4UMFxN2LckKEAvr0JUK5Bit6x2io= X-Gm-Message-State: AOJu0YzM6RrtRQ7mP3tILY7aj33nJsYjK1u6V9dd+l8zNLtGtb0jGOM2 B0lzcdsrJcBzbrmNp6R+BuUfkasThPu6qLOLRbR6vys2BX5y5SUjxtmfSFs/U1c= X-Google-Smtp-Source: AGHT+IHidc0HMkZpoHuW0F0Uuz8Q2jiGIktaIZ3mnWU/29ySDASkCqqcBJVcUe29ebu6h5fIJXGpJA== X-Received: by 2002:a17:906:4bd3:b0:a65:ab25:24da with SMTP id a640c23a62f3a-a681ff4540amr819129466b.22.1717492149299; Tue, 04 Jun 2024 02:09:09 -0700 (PDT) Received: from raven.blarg.de (p200300dc6f4f9200023064fffe740809.dip0.t-ipconnect.de. [2003:dc:6f4f:9200:230:64ff:fe74:809]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a68fa49e66fsm328376766b.129.2024.06.04.02.09.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 02:09:08 -0700 (PDT) From: Max Kellermann To: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: willy@infradead.org, sfr@canb.auug.org.au, david@redhat.com, Max Kellermann Subject: [PATCH v6 03/15] include/scsi/scsicam.h: forward-declare struct block_device Date: Tue, 4 Jun 2024 11:08:33 +0200 Message-Id: <20240604090845.2182265-4-max.kellermann@ionos.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240604090845.2182265-1-max.kellermann@ionos.com> References: <20240604090845.2182265-1-max.kellermann@ionos.com> MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: A8EE41C001A X-Rspam-User: X-Stat-Signature: npg1hwfgnj6rtd4t7ajdgpzpbcga3mq8 X-HE-Tag: 1717492150-338654 X-HE-Meta: U2FsdGVkX1+yt2AcoAwkt4hGIewZvlDIXxAzEtV8uoVu6Gmi3c2aABUm7obipe+Ai2msaY+9DB4sQ1L9jn9az9TZcUkJEN01ps1BNQR1l/XV4n9AzQkSey4WngSn8XZqGDBcudyuXnfULDaZfSAYc9Tx8HpqigNVUzQQhm1PBgjeaKbc5yGKP+erKlowgHS+lpsNkjBead8PNjWKRr4BgUV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4jthlXXhAjE21sUVu7nEMQIHzRbeXqNzaNI55Tcx6fOdxRnUztpVhOZ+TLFqzyYGGRwD+V8/KIL9HnzyjDoTWdodHamufkQiiLk19Kf5PQ3tenKqZfUmBVqev9MceRCM4Bg= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000043, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: After eliminating includes of linux/mm.h, the following build failure occurred: In file included from drivers/scsi/fdomain.c:87: ./include/scsi/scsicam.h:16:31: error: 'struct block_device' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] 16 | int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip); | ^~~~~~~~~~~~ ./include/scsi/scsicam.h:17:27: error: 'struct block_device' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] 17 | bool scsi_partsize(struct block_device *bdev, sector_t capacity, int geom[3]); | ^~~~~~~~~~~~ ./include/scsi/scsicam.h:18:40: error: 'struct block_device' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] 18 | unsigned char *scsi_bios_ptable(struct block_device *bdev); | ^~~~~~~~~~~~ drivers/scsi/fdomain.c: In function 'fdomain_biosparam': drivers/scsi/fdomain.c:475:45: error: passing argument 1 of 'scsi_bios_ptable' from incompatible pointer type [-Werror=incompatible-pointer-types] 475 | unsigned char *p = scsi_bios_ptable(bdev); | ^~~~ | | | struct block_device * ./include/scsi/scsicam.h:18:54: note: expected 'struct block_device *' but argument is of type 'struct block_device *' 18 | unsigned char *scsi_bios_ptable(struct block_device *bdev); | ~~~~~~~~~~~~~~~~~~~~~^~~~ Signed-off-by: Max Kellermann --- include/scsi/scsicam.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/scsi/scsicam.h b/include/scsi/scsicam.h index 6eb9fb7a57d0..c0de038b76b5 100644 --- a/include/scsi/scsicam.h +++ b/include/scsi/scsicam.h @@ -16,6 +16,8 @@ #include // for sector_t +struct block_device; + int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip); bool scsi_partsize(struct block_device *bdev, sector_t capacity, int geom[3]); unsigned char *scsi_bios_ptable(struct block_device *bdev);