From patchwork Mon Aug 23 07:33:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 1519560 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=b4fxfBN7; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=qw2zPFDK; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GtPGb0BVZz9sWS for ; Mon, 23 Aug 2021 17:37:42 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=BMVrwZL9msFH8dXLUhjgIteQqqNNaG/6SmjGnEZozUQ=; b=b4fxfBN7jtoTsq ZV5p+HVQ1iG1jyfFttr3D0V4rRNYvmkIIwbLss5/thJfiNaVbYdxxNQpnq71oGdBE9zX14tuQNMcb 48TsPh+tgOsHiBVW9b54L+tvEZzdYfTiXCOa9uLYR9xxhUJUx9sfqGhegpFSYyH++SxLB1IfxgsH1 FFf5e5CBfGRWAtm30eEw48dQuJQ8oj++rwyOcRPMA3tMFHpUk4/Cl5wv31FgOB4vb89WXKhZDEq54 P6xwGKjLTYK/Ve+I4PT6XFEOR9bXZIdy+ebiMZF0uU85/El14dF1937B0aNb/47kt/Rda+MokKoHl hfSGhdY+GMZWPWTWm4jg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mI4Vz-00Fkv0-Ki; Mon, 23 Aug 2021 07:37:03 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mI4Vx-00FkuB-SG for linux-mtd@bombadil.infradead.org; Mon, 23 Aug 2021 07:37:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=yDVJqb52UG/kPc/O2lDZLqU6iuRuPPYbXt2KymxHM48=; b=qw2zPFDKzIICgXNI4UeGsND53I r9pL6KIRnBJQNuoCZC7jMThBsfp9Ist8xuRIPNGqtp9zRjSkbyte/Xuk0250mYEwvWF9h1a5GYn5b SoIuTcXLbS4LWyD9kNm9SBRHh0Y3Yq7HIhRmZbMpzn07CAsKDrnZ6I7yzt087Js5dYyG5mKFsvcsg HIQ+tXh+iJxu5jXPl9q35/qrBtgyTe3GB1oLhah0nToNH1MO6eKq63BAF8PWQQfOGvTQHbVtOeRn2 +U5r98UBctg75X9A17bbRRNuSj1KKeDp5jKEDDxqyyCkEAcctGiFTUjzoGzFqX6mNt2jmGIEe1L4r BbfeXXIQ==; Received: from [2001:4bb8:193:fd10:c6e8:3c08:6f8b:cbf0] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mI4VN-009Qm5-72; Mon, 23 Aug 2021 07:36:41 +0000 From: Christoph Hellwig To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Guenter Roeck , linux-mtd@lists.infradead.org Subject: [PATCH 3/8] mtd/ftl: don't cast away the type when calling add_mtd_blktrans_dev Date: Mon, 23 Aug 2021 09:33:54 +0200 Message-Id: <20210823073359.705281-4-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210823073359.705281-1-hch@lst.de> References: <20210823073359.705281-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Pass the actual mtd_blktrans_dev instead of casting the containing structure to void *. Signed-off-by: Christoph Hellwig --- drivers/mtd/ftl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c index 9b33c082179d..f655d2905270 100644 --- a/drivers/mtd/ftl.c +++ b/drivers/mtd/ftl.c @@ -1029,7 +1029,7 @@ static void ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) partition->mbd.tr = tr; partition->mbd.devnum = -1; - if (!add_mtd_blktrans_dev((void *)partition)) + if (!add_mtd_blktrans_dev(&partition->mbd)) return; }