From patchwork Mon Oct 7 12:23:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 1993628 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=aBED/Q4a; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=lNrDCOMN; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XMf4j2Zrdz1xtb for ; Mon, 7 Oct 2024 23:45:09 +1100 (AEDT) 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: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:In-Reply-To:References: List-Owner; bh=kOZwFSshLo+8Vm8yLC9HauJbq9GV2J9HR+luh63fZ/Q=; b=aBED/Q4a84w6Np /ep6F77r6j4sx481t62MNTtMTaX7WelE9O4mTbWbop7BYq6YS7cO5ZtoVB8alXUCXFcvysVmh501P r9iZ60amqPETskdDVcCLRe6dwP5iLRfKsrr39ag10mNgZoEU2EP16OBoZajStoyX27subbFYB1F2D /wimwHbYY1HYiA8l5YRidKzJGOF8zeIQ48jgd41bFof128clJe67XmKvj25UutBVlDPgF+I2zMD7K feST5bC89v3OA0xuVwQZoyThs8pI14/+R1zuy6DtoFgBqdiAPKSFWPxolDxecLuVd8tfspvMISv5A 4/B3YFVnu5+VXqObtfIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sxn6V-00000002O0M-2M1t; Mon, 07 Oct 2024 12:44:47 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sxmmR-00000002Jit-1nXU for linux-mtd@lists.infradead.org; Mon, 07 Oct 2024 12:24:05 +0000 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-37cd3419937so2671024f8f.0 for ; Mon, 07 Oct 2024 05:24:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1728303841; x=1728908641; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=i0x8y87bn5ImDPZMm7UguhM/GLub+WZyzCKBTUmGFdo=; b=lNrDCOMNghjzh963pKtlMkhURWRRb1BCxVOGZERqp1ywE7taggayL0bE4wHkuQeuxa XgeAhvmii4VGLvRvI/e2TWVlduOkYFjIZBZj4o6dN+Y6MzJGogX/CXRP7Gjf6yeS4iX/ wZX/LxWQqecvqlRuSKp4ju+FkSh/RwmFnyeHruNzCIsCpg1MCKe+8qUekS/fsOUed4vT Rg9yiuBrQt5dobQrWAuw4VicdjRx7Ydk9M5XS6+nKraZpc3e+evXJMVe8/e+zEAOrcxE kyfLyB4GBhlILWYhA7+auh4nk7GOuchiLY4r1wLghx0A0pEeXD0YA8xSR7CxjX+vC5vW UwQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728303841; x=1728908641; 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=i0x8y87bn5ImDPZMm7UguhM/GLub+WZyzCKBTUmGFdo=; b=ZhGj8XKy4Gc5QJlZqT8rbHdwCGwvCpt+zYk+6j5Tk2LHstTRAICNV4W7cqwdYwp1Gq KW2eIli/N0Cb10K+ML1vRntaeTq/jTcm+4vZGRwT/tZ/EBZMK7VAsBf3WdLBO2ph6cTl +R/ksx/uyfHsBdcxzof/W8AsI5DMkh5AL13sqZ/1SgfwSk/xdFsdhxlRuQ0ZDKtpsOKJ 5yXr/MM8ZqGZvkOAl+pexuFLMCpWzQrbtWMBilzqJGK8z7dpm0tLeW0F9N92O9ognizD o4g8UesXbErRAJnMDhbHp62UAKTkDhuMM/+apFOwzIHjdUNVH7+BpXG4sz0sntZgghlB aaEA== X-Gm-Message-State: AOJu0Yz8vqynSXWrH3CXPx/adNdgF9Gr6qWQl7V6QIv5+3G6v8hCZxUL cBPd4jUdxCe405+elRggAsH8aacWUzc70Z1lp/xfPZgUHTC9uyyEaFGyJSCrK2A= X-Google-Smtp-Source: AGHT+IH7Z3gGU+OpbosbKN5JB3GncLHxrRWfwfdnT4hZxzI1DxGshRKwTaLqBpQOhnt6dyskjjSC7Q== X-Received: by 2002:a5d:4a06:0:b0:37c:d26d:1d03 with SMTP id ffacd0b85a97d-37d0eafa5b9mr7222670f8f.43.1728303841039; Mon, 07 Oct 2024 05:24:01 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:dc:7e00:6100:637:cbe9:f3bc]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d1695eee7sm5626914f8f.82.2024.10.07.05.24.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2024 05:24:00 -0700 (PDT) From: Bartosz Golaszewski To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Bastien Curutchet Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 1/3] mtd: rawnand: davinci: order headers alphabetically Date: Mon, 7 Oct 2024 14:23:48 +0200 Message-ID: <20241007122350.75285-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241007_052403_501209_4E8A3FE5 X-CRM114-Status: UNSURE ( 9.55 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Bartosz Golaszewski For better readability, put all includes in alphabetical order. Signed-off-by: Bartosz Golaszewski --- drivers/mtd/nand/raw/davinci_nand.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:433 listed in] [list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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 From: Bartosz Golaszewski For better readability, put all includes in alphabetical order. Signed-off-by: Bartosz Golaszewski --- drivers/mtd/nand/raw/davinci_nand.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c index 392678143a36..5510b39c0b98 100644 --- a/drivers/mtd/nand/raw/davinci_nand.c +++ b/drivers/mtd/nand/raw/davinci_nand.c @@ -10,15 +10,15 @@ * Dirk Behme */ -#include -#include -#include #include #include -#include +#include +#include #include -#include +#include #include +#include +#include #define NRCSR_OFFSET 0x00 #define NANDFCR_OFFSET 0x60 From patchwork Mon Oct 7 12:23:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 1993629 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=PbXVPISf; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=m5aAXCCd; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XMf4m65Cpz1xsn for ; Mon, 7 Oct 2024 23:45:12 +1100 (AEDT) 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=mxnWR1gZVsaYaxgVQTsQPMj7Q1FOWaRr21SPh46H/fA=; b=PbXVPISf4BMwuB mk4/SAZn6Yv+9gJNnrrdwDIzglMbFU+N82qEqGW/P9JfxyYu3AqFda5/rOZLlDcnbMj8/k4AgPCLM FS9mb01zNDxDCSeggviwsYM4UAK6/B+wrGfWkAgld5UWKTWUu9Q7yWkQLC549/mNdVlXFYxsi2/91 N4gYisjW8qTeNyQ+2MmBNCgNG4GaDwvshd0Dz3XMT+42j9T5T1gOyPxRaMAcB4tk7aVshOX3VnM7E GwYEdNrU/bhj/FigT22Usvez0gfSV48iNYV85Tb/tRB5EdHt1rHkM6Xg6Eh5CUNVi/gDoiaA7chJg UlnVwfesxthJvaYXy4MQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sxn6W-00000002O0W-0Rxf; Mon, 07 Oct 2024 12:44:48 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sxmmS-00000002Jj2-13aN for linux-mtd@lists.infradead.org; Mon, 07 Oct 2024 12:24:05 +0000 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-37ce8458ae3so4103319f8f.1 for ; Mon, 07 Oct 2024 05:24:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1728303842; x=1728908642; darn=lists.infradead.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=Mtsdn2sdnIw2THBvQxYTL0WcNMFNnP+qLKduuE3CQsw=; b=m5aAXCCdNaop6G1fWvfWlnA1bgBHTvylLc/XRDQp/O+f/Ey2ZiIoTLLv+QkNi5lo1O PtE5iY2B/iUDYNS5DUln2wcfX4C7a7wo7eZ/IBQ8I3A2cnrvfiBevdDjJc4sYxFnX60S yO/eHpMpQL19wmA8IdalR1AK1bdCkRDubSGAtREnY4xDZCd4vg8tclQsi98n17KYKF4c CEFz0J5hD9KVlsV6U2iIuCyAvPcdJGqqs3DgqgQeTLRISWUL0JPvud6IcgFsHrlcj+tJ 9ql1+tyHdwX39gHC8ZMrqrN1cYJjdVYovG/X59wUcrumwgXcp9PlPqtVJAvOCV2v7/VC GN9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728303842; x=1728908642; 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=Mtsdn2sdnIw2THBvQxYTL0WcNMFNnP+qLKduuE3CQsw=; b=Px3fu1bA2ROxN6dU9vc2obQQ37dIMprPjImwRREajRI4bliaMmgV45tK2Tlk0I1FvX 5APat4Sq2eP1/HU8j1s6pIekrmF9p/9SwslZVZUVSCZCro393IR2R+QMvXuqntO0pwd7 rGfuoasb5Qd4z7z+FWHcGyGw2Ql2XzlByVG9OEAI3KN/He91IaFQl8KQOtkOGLwI6vIo t076r7vzmmwXCDd12/rq9rB4prkCMCnrj5cIoC4yMDhfv5Hl+qWow0ICtpBYf4D2iLxF oius5b31n2j9WdWFfI1+j2/H6P1d2NwiK+RkHAOUJvL4W4YzmwvIFra5o9J40cXhXcMm +JPg== X-Gm-Message-State: AOJu0Yy3lFOqo90Yk4XgFDj64qFxdIWuIH4EoxpBOLjY/OSXJntGPxHT eo30YSC87aNp3lS19deseHhIXcBWzoHkX4CNvk6nl1LhzAU6x8gy9M3P5RwDlPtOoitMfb04dBT j X-Google-Smtp-Source: AGHT+IE5a2HJKDGTi1yqW5JxEQV/1ZD7BrBNtA8ZdNme3sZO53ssLaPmPv8UF1maBvki6cDzJkuG9Q== X-Received: by 2002:a5d:6a4e:0:b0:378:81aa:2653 with SMTP id ffacd0b85a97d-37d0e6eaee2mr9694904f8f.9.1728303842271; Mon, 07 Oct 2024 05:24:02 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:dc:7e00:6100:637:cbe9:f3bc]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d1695eee7sm5626914f8f.82.2024.10.07.05.24.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2024 05:24:01 -0700 (PDT) From: Bartosz Golaszewski To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Bastien Curutchet Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 2/3] mtd: rawnand: davinci: break the line correctly Date: Mon, 7 Oct 2024 14:23:49 +0200 Message-ID: <20241007122350.75285-2-brgl@bgdev.pl> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241007122350.75285-1-brgl@bgdev.pl> References: <20241007122350.75285-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241007_052404_319364_C514B052 X-CRM114-Status: GOOD ( 11.42 ) X-Spam-Score: -1.9 (-) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Bartosz Golaszewski The line in nand_davinci_get_pdata() prototype is broken in a weird and unreadable way. Make it consistent with the rest of the code. Signed-off-by: Bartosz Golaszewski --- drivers/mtd/nand/raw/davinci_nand.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:434 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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 From: Bartosz Golaszewski The line in nand_davinci_get_pdata() prototype is broken in a weird and unreadable way. Make it consistent with the rest of the code. Signed-off-by: Bartosz Golaszewski --- drivers/mtd/nand/raw/davinci_nand.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c index 5510b39c0b98..6c884b59bc98 100644 --- a/drivers/mtd/nand/raw/davinci_nand.c +++ b/drivers/mtd/nand/raw/davinci_nand.c @@ -487,8 +487,8 @@ static const struct of_device_id davinci_nand_of_match[] = { }; MODULE_DEVICE_TABLE(of, davinci_nand_of_match); -static struct davinci_nand_pdata - *nand_davinci_get_pdata(struct platform_device *pdev) +static struct davinci_nand_pdata * +nand_davinci_get_pdata(struct platform_device *pdev) { if (!dev_get_platdata(&pdev->dev) && pdev->dev.of_node) { struct davinci_nand_pdata *pdata; @@ -557,8 +557,8 @@ static struct davinci_nand_pdata return dev_get_platdata(&pdev->dev); } #else -static struct davinci_nand_pdata - *nand_davinci_get_pdata(struct platform_device *pdev) +static struct davinci_nand_pdata * +nand_davinci_get_pdata(struct platform_device *pdev) { return dev_get_platdata(&pdev->dev); } From patchwork Mon Oct 7 12:23:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 1993627 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=CzMLMVD4; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=jNaSpubP; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XMf4j14Ldz1xtV for ; Mon, 7 Oct 2024 23:45:09 +1100 (AEDT) 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=oTfmCE3nOzEQ8gCwCuSI3lnh2frpWyWMbQxysr69REo=; b=CzMLMVD4zChPvY RhYDXbvq6hBh2X+MvmfD+kguLMjy0iFnReaJFbMv2zH8yBfY+pgLZJ0Uul9/li6xbhfz33TBm7Ztz Gv5N0NikzGvJEGY1Bg1cIiytN5qU1vfSdcS4Yd9qiOgiMit8jDxbnkRO1XxydlPX1VtMWSwJgPGBF AT1NBkXAc4FNx4K4M7uG24mIshIrYSVIdXPADPWqGQkVvIwuNIFeshnTIfCWwxxwAxhClBIk0Bdhb rXeL3gxgFkQ11t/s6a5WR245fTnlQGNxp4uws2nZhrBW4W1wZx48MczfgAoUPdRKGOrL+duwfBQu1 UKZAuAfCwj6VNzHCe+MA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sxn6W-00000002O0i-2o4K; Mon, 07 Oct 2024 12:44:48 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sxmmS-00000002JjQ-3q1q for linux-mtd@lists.infradead.org; Mon, 07 Oct 2024 12:24:06 +0000 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-37cc846fbc4so3437595f8f.2 for ; Mon, 07 Oct 2024 05:24:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1728303843; x=1728908643; darn=lists.infradead.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=DGEx0PqXJtkFOmfslpcNhDWKLxmXujVpKffyfiMkAQo=; b=jNaSpubPtv+lInLbgPvmfuO/JkC4CHDVlOEXkjQ7ug1huMK5ea5r9GUfhRPWYa9N5B fvrH0LlVKwWvNiCcZkSTQFj2ccGzBvi8loCoHHOUQX3U1H+Tqg1jqMGih5h/a7NmJRxW pe0afU6sZuNyUJuBXjEYLwNmHQ0kAV+Uz4gKVeMWKS6s5EbJgSC+oiMd2AfWonrhB6tD O8gw0PHJuORps1q40BzbH31XcVqy7AeBUDPgIuvppJYn3m6Hw3cs9nOjhIlLf5/Z6UUA WvfB9MJvGcbrIDorcBFhuvRRFiDg1PrRhQMvYwamI258n+Jhy7omPYTj3ZbxhEi/fnUv zBag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728303843; x=1728908643; 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=DGEx0PqXJtkFOmfslpcNhDWKLxmXujVpKffyfiMkAQo=; b=EtwVu57GwzVNMPoC8ySXh6vxPDP4ckJA3PbnOiLujGVrH2aIhkZwvS6fUsuUSfs2tr TwHXLDaipsM+AgEMdl+54SOLxbhhE0M6dzYCrkmYdB9BuBHP700vejl3MkDflVQHbnss 3nKr//mOV1sZ8aYyXmYrtaExBADVwjjex6nvsSEqeuOxZwPcNUxbjsSOa3ns4wqC0unr 2cqhL8glZgZS66x/c5cP37VyYmpyGw4livIn/yHX2PU73CYEj4KTHz0LxoqA49oUD8n1 cIM0I9Z3srJj2PRU4ikKkZg/xhuqNNKGoeJzgQs+XjFC6wn66gGOMq77LOvBU5ZRsoN2 Qoaw== X-Gm-Message-State: AOJu0Yzp3UmqqV9vg8KGeYXpmS6arTytf967q3T8SQ0wcp0gBvRlX/y+ 9GjXVEpCanG6xOLgzuZOHEAUklEJc115dU5ApquATx2XtcG4yY67O2AL14+z0U0= X-Google-Smtp-Source: AGHT+IG3223yd5krdGXCAeXQtchm5yoDR1rjmKlsg43mtdR4eUr7d5W6MmDV+vaoAWxHhdsKeuM+aw== X-Received: by 2002:a05:6000:4586:b0:371:8a90:112f with SMTP id ffacd0b85a97d-37d0e8df590mr6469416f8f.44.1728303843426; Mon, 07 Oct 2024 05:24:03 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:dc:7e00:6100:637:cbe9:f3bc]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d1695eee7sm5626914f8f.82.2024.10.07.05.24.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2024 05:24:02 -0700 (PDT) From: Bartosz Golaszewski To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Bastien Curutchet Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 3/3] mtd: rawnand: davinci: use generic device property helpers Date: Mon, 7 Oct 2024 14:23:50 +0200 Message-ID: <20241007122350.75285-3-brgl@bgdev.pl> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241007122350.75285-1-brgl@bgdev.pl> References: <20241007122350.75285-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241007_052404_994827_FF5276DF X-CRM114-Status: GOOD ( 13.28 ) X-Spam-Score: -1.9 (-) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Bartosz Golaszewski There's no reason for this driver to be using OF-specific property accessors. Switch to using generic device property interfaces and replace the of.h include with property.h. This allows us to no long [...] Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:433 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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 From: Bartosz Golaszewski There's no reason for this driver to be using OF-specific property accessors. Switch to using generic device property interfaces and replace the of.h include with property.h. This allows us to no longer check the existence of the associated of_node. Signed-off-by: Bartosz Golaszewski --- drivers/mtd/nand/raw/davinci_nand.c | 42 ++++++++++++++--------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c index 6c884b59bc98..aa7619eec59e 100644 --- a/drivers/mtd/nand/raw/davinci_nand.c +++ b/drivers/mtd/nand/raw/davinci_nand.c @@ -16,8 +16,8 @@ #include #include #include -#include #include +#include #include #define NRCSR_OFFSET 0x00 @@ -490,7 +490,7 @@ MODULE_DEVICE_TABLE(of, davinci_nand_of_match); static struct davinci_nand_pdata * nand_davinci_get_pdata(struct platform_device *pdev) { - if (!dev_get_platdata(&pdev->dev) && pdev->dev.of_node) { + if (!dev_get_platdata(&pdev->dev)) { struct davinci_nand_pdata *pdata; const char *mode; u32 prop; @@ -501,23 +501,24 @@ nand_davinci_get_pdata(struct platform_device *pdev) pdev->dev.platform_data = pdata; if (!pdata) return ERR_PTR(-ENOMEM); - if (!of_property_read_u32(pdev->dev.of_node, - "ti,davinci-chipselect", &prop)) + if (!device_property_read_u32(&pdev->dev, + "ti,davinci-chipselect", &prop)) pdata->core_chipsel = prop; else return ERR_PTR(-EINVAL); - if (!of_property_read_u32(pdev->dev.of_node, - "ti,davinci-mask-ale", &prop)) + if (!device_property_read_u32(&pdev->dev, + "ti,davinci-mask-ale", &prop)) pdata->mask_ale = prop; - if (!of_property_read_u32(pdev->dev.of_node, - "ti,davinci-mask-cle", &prop)) + if (!device_property_read_u32(&pdev->dev, + "ti,davinci-mask-cle", &prop)) pdata->mask_cle = prop; - if (!of_property_read_u32(pdev->dev.of_node, - "ti,davinci-mask-chipsel", &prop)) + if (!device_property_read_u32(&pdev->dev, + "ti,davinci-mask-chipsel", &prop)) pdata->mask_chipsel = prop; - if (!of_property_read_string(pdev->dev.of_node, - "ti,davinci-ecc-mode", &mode)) { + if (!device_property_read_string(&pdev->dev, + "ti,davinci-ecc-mode", + &mode)) { if (!strncmp("none", mode, 4)) pdata->engine_type = NAND_ECC_ENGINE_TYPE_NONE; if (!strncmp("soft", mode, 4)) @@ -525,16 +526,17 @@ nand_davinci_get_pdata(struct platform_device *pdev) if (!strncmp("hw", mode, 2)) pdata->engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST; } - if (!of_property_read_u32(pdev->dev.of_node, - "ti,davinci-ecc-bits", &prop)) + if (!device_property_read_u32(&pdev->dev, + "ti,davinci-ecc-bits", &prop)) pdata->ecc_bits = prop; - if (!of_property_read_u32(pdev->dev.of_node, - "ti,davinci-nand-buswidth", &prop) && prop == 16) + if (!device_property_read_u32(&pdev->dev, + "ti,davinci-nand-buswidth", + &prop) && prop == 16) pdata->options |= NAND_BUSWIDTH_16; - if (of_property_read_bool(pdev->dev.of_node, - "ti,davinci-nand-use-bbt")) + if (device_property_read_bool(&pdev->dev, + "ti,davinci-nand-use-bbt")) pdata->bbt_options = NAND_BBT_USE_FLASH; /* @@ -548,10 +550,8 @@ nand_davinci_get_pdata(struct platform_device *pdev) * then use "ti,davinci-nand" as the compatible in your * device-tree file. */ - if (of_device_is_compatible(pdev->dev.of_node, - "ti,keystone-nand")) { + if (device_is_compatible(&pdev->dev, "ti,keystone-nand")) pdata->options |= NAND_NO_SUBPAGE_WRITE; - } } return dev_get_platdata(&pdev->dev);