From patchwork Mon Aug 23 07:33:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 1519561 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=i7/VxEfS; 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=f26IJTI1; 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 4GtPH90B4wz9sWS for ; Mon, 23 Aug 2021 17:38:13 +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=baudEJMK0BXEbHDtRqCNAZqNIAiEE+XIPSLgFDr43Qk=; b=i7/VxEfSSSkm4R VtUYTMwJzRePCDpcmq+IWVyKKAWUzYGSnPmDsSKrti4CscT5QvMcNdAzV5QG8czt7J/JN0hKDOFwl MDCwf/Nkn8VR5V3MRJi2FNoZ90M8ZPP76VMWEnrPd3ENoKRmpb/yEn/4Lls7cO0V9PpRa+1Vv/v3o qsQClypDFQevgIUPbP1lr4bWXHc4GKeV3wWua34xWIxMlgPxSTTgkylMSJ8wRP7BcyGDInHtPNuyH +ts074iX+S05OfvISTEbqMoNhz9BQ87bmgZSziML4J0CuDLtnpxYCv0LWaZ9Genkw/kCKBMQGt7Hm mgtlat9QZk5KgBooqc4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mI4WU-00Fl53-Hb; Mon, 23 Aug 2021 07:37:34 +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 1mI4WT-00Fl4N-Ct for linux-mtd@bombadil.infradead.org; Mon, 23 Aug 2021 07:37:33 +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=d8ougPyR10neolLj0oF8pa2cwhasqlbLsL7gbTrUUE0=; b=f26IJTI1nQaR8jlZLlUqDTyvms UfuJR83srDKJX7MR1n3sd2pXx2lQRb/Fbn1lNuPYPv3Z4vQnWJV3Asc/seDka1OABMFPxksDeNSFt HRXXlPexqr+T6srnLAAMRsuD/y2zQKuM6pzW9cu5jKFOgOVZbJa8ZMltBxA/s1AFUkJ0fNEigNVdP rfDKqhbYh1BPvkSoRZoMxdqiLfioo8fuHEva3WT23WmKIFxcGIFWfpzqv/s5l/lCLdsXhl97QU2vS GP4N/wpOAN2ygGzNLRIgwbAewaAh2T0tT1uFbtkCaWi2Idc9Z0t+DLSutNWF51VEu65N2RalCXOAL gVOy/zzw==; 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 1mI4Vx-009Qpl-NA; Mon, 23 Aug 2021 07:37:11 +0000 From: Christoph Hellwig To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Guenter Roeck , linux-mtd@lists.infradead.org Subject: [PATCH 4/8] mtd/rfd_ftl: don't cast away the type when calling add_mtd_blktrans_dev Date: Mon, 23 Aug 2021 09:33:55 +0200 Message-Id: <20210823073359.705281-5-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/rfd_ftl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/rfd_ftl.c b/drivers/mtd/rfd_ftl.c index 6e0d5ce9b010..6cf9356d3567 100644 --- a/drivers/mtd/rfd_ftl.c +++ b/drivers/mtd/rfd_ftl.c @@ -754,7 +754,7 @@ static void rfd_ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) printk(KERN_INFO PREFIX "name: '%s' type: %d flags %x\n", mtd->name, mtd->type, mtd->flags); - if (!add_mtd_blktrans_dev((void*)part)) + if (!add_mtd_blktrans_dev(&part->mbd)) return; } out: