From patchwork Fri Jan 26 17:15:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13532901 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 45F68C47DDB for ; Fri, 26 Jan 2024 17:16:17 +0000 (UTC) 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=Qf/UfBCBqid3+mkMUJLG81jPcYtx4d6jTHFGQGogFtE=; b=U4n3sq4aTNeaZr KiSoiO0nRwS/xxZPe8674lO28GneWdlQmvFzCkGJ89OcwAIUaI1AnX0Cm8qEzbfBiKXBDdxIJDgPF QFCKIIWvIGPhJCQeKgIqUklJ0kEW9iGO5F/KsB8puvXyU4zXIOJmp4ulNfTZxye8Gr8eDHCu2idYL ROYwDxbVqpwsajy5OFCwbbjGQ8GZLjZq6ZQ1RwxVhmUdbrKnenxSGXHDd8W6oB37+QqbdonT+MWPr YlCZE+UVwJ6hEyy7/VMbaBry8ESFevh4Wvz2YlBmZtUuA60LyZy9CAWty82f8PKynWt5PVHmQRtxL RsiZZXEnblXc8UHJb73w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPoA-00000004pUn-1kWC; Fri, 26 Jan 2024 17:16:02 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPnz-00000004pOQ-0m15 for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 17:15:52 +0000 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40ee705e9e3so7013835e9.1 for ; Fri, 26 Jan 2024 09:15:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289349; x=1706894149; 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=600VwywIwYkKhIBCMOdOgBJMPRHlSjpGBD3EGORG+P4=; b=D5NOtnBJnXOjFDxkE39EEYjlBkEMiXSXyAz7jZBHJWj9K0JWercEKfIo6bupvM6lJ4 IfnWD7nT1JeUaOhmZX7iOSBZQxl/AbFb7dOpz7TnSAk58Q/rtOEMkzd7nvV68Ixt+InV p5+asrL38wuRRRl1EeibOiEPASRs44B96sJ5xFlfnHN5nGG9ETUeo1Wxibv0o0tr0YmF Ja/xEBDhppUuTUTm9UM5BPyVtJssRgM+Xyr9v7UJcJhBPGvB85d6AczR2NThqicbEQd2 SSzlU4+t+1MGfJMR3vKyI+avbmY6psM7pY3TfX89GGatz6mkcmTYQbMN6n5n26TnTwaz 0O/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289349; x=1706894149; 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=600VwywIwYkKhIBCMOdOgBJMPRHlSjpGBD3EGORG+P4=; b=minjAUR/PPab+air2lX8y9QOIPc1XxJu1+Vl2qCLAmkgGiAJ9WNTjJjL5mTxpruJ3F fdu9VtNvTHLlZ4YXHvNdoDSryITBDp4wKmqsfI3+F6x2I/zQzWr8nbRpP0aFItdupgEx ilGF+AZmJYze4QQbCl8pVhx5dFUJQ2MhsLgGbNTKXwevfMWjhnPsqm65o1YvbKv38qSK W1BavDzpFDFGVoyRGdNDONeACWT7TzCZVq5EQhhHk+Ebi4fTl/Xi7eooTTus5EuZeKod wrq+y09Nqa/dydQGnElSUQxAyo9xqND4qWBLD0ip7ykRxqJWZ2/2ZXpAeAqW33dO0kMg FKtw== X-Gm-Message-State: AOJu0Yyl/wvaLe71CdTAdUaoYcaLNtSTeHzlhGQTOccZCws8I8JD42Rd 7w9akGV3xqJAnq9OQhkiyooOCuUWe3fKsQ/LtY3BEwR+Btbtun9/AbHOSZITbGI= X-Google-Smtp-Source: AGHT+IFxC11M+LjBfLJPSBh9/EVnhgXhYyzN+hO1o/eiQaDN7j05eFKx0HSJPEBY9Ly2uaqGYz2UCA== X-Received: by 2002:a05:600c:5492:b0:40e:6710:c10b with SMTP id iv18-20020a05600c549200b0040e6710c10bmr84903wmb.117.1706289349415; Fri, 26 Jan 2024 09:15:49 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id k10-20020a05600c1c8a00b0040e451fd602sm6287286wms.33.2024.01.26.09.15.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:15:48 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, jassi.brar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 01/17] spi: s3c64xx: explicitly include Date: Fri, 26 Jan 2024 17:15:29 +0000 Message-ID: <20240126171546.1233172-2-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240126171546.1233172-1-tudor.ambarus@linaro.org> References: <20240126171546.1233172-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240126_091551_229996_CAFB3F8B X-CRM114-Status: UNSURE ( 9.04 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The driver uses readl() but does not include . It is good practice to directly include all headers used, it avoids implicit dependencies and spurious breakage if someone rearranges headers and causes the implicit include to vanish. Include the missing header. Fixes: 230d42d422e7 ("spi: Add s3c64xx SPI Controller driver") Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 7f7eb8f742e4..c1cbc4780a3b 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include From patchwork Fri Jan 26 17:15:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13532903 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 14291C47DDB for ; Fri, 26 Jan 2024 17:16:20 +0000 (UTC) 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=NYp7+0u265rPPHQPBOkGZPliLkjKCGjPsSGvZyXz8W8=; b=kKMHJMSYqt7vea UKGhn6YJJEAYH4pP762gztWWJ8AOGiDNVWuzYIHLI4LKGNnBYab50vU/wdx/Mx9jvbLtq+EAjoi/f k7aUmoJP/5BM3ywe3rQ3jVtupA7XBYlXI84TRplu4nQl2VrrnCKnx7hdNhnzA4NZ7byQdailMcKcb mCpx9JQLkRX5DYi66yTHuH7bcOCmoQlRHbomhCc46E4q6bHHoi7b6sHMLqn2CGBS12liSgFe2ZbpN LhujmudhCMp7M+Kygxe7vvISXPUUOSYsOlh4we2XaVIznfm3aBolmHFD1h8KHJceNmMk8v4mxJsZT Ayhe/SdqcwJnCLHSuTiA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPoB-00000004pVY-1NmL; Fri, 26 Jan 2024 17:16:03 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPnz-00000004pOg-3Jg7 for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 17:15:53 +0000 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40e5afc18f5so9670395e9.3 for ; Fri, 26 Jan 2024 09:15:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289350; x=1706894150; 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=Y8tycZHq++FMKvH1QpORqsbZ4vIzt59SLtlLRtqr3vk=; b=BxXlmibTU3F4dGlWhZD8A8JZCggBanzqoMMdHjaMRa4saYB+BwzzemFecPSd21WBgg BJfO9r/7bTDEIzP8wMmHHMXAT3VTaaQAM96V+4o3zSTq3p1ie/ZQzd0VGxvOoCiLPet7 v7QACDlQIpzulX7BXS3oqg5CyLynfyMc5rQyKcZDVIyBU7pft4OJ0/WvvrflM/nfZIb5 T3TmS9wvk4T6L2heZN1Z2mCwlGu+d7/lGjTdrEoPQ6dza/KQ6MlCYfNIyzePAvZe5Ldl BVMwR1VbuatYdyW6AC2W9aruJ7U027tFtGmUdtmxfHi483sqWI5HEA6kkF9JQIf/V0Rp neeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289350; x=1706894150; 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=Y8tycZHq++FMKvH1QpORqsbZ4vIzt59SLtlLRtqr3vk=; b=turSyn5tw1r4nrzW8Pe0LCD7QSYSmL20k1U+GPEFc53TAnhup1hmgQvteMbGilpNUP XKBTtA8WLm6kbwuRqBolAgTFL5m2/h5+NbUodVHTa5Nxd45lvT6tNoToVvntmcoZJ4jE JOVR2rptCcnB3sRiS6r7WD13l4aXvOc034xbTFHd+LCapV8gTapEm+99OeKQ+j/meCfo E29lmN035EhUe/X52miDszuCwdjqAWc2Ddu/KSxxcbA/IKXUfeL8qfNfhWhf1iiE2efo uhCmcK5QTvyj3GmcSp52p2kZJ8grhDeWtf1bb4Com7b1zxTGkdF8F3d+E10OCHrs53Ch uVuw== X-Gm-Message-State: AOJu0Yy2cPIMnKI2SSv3GriYbhE+iB52i/N62B4wVAHCFmJsy0UaIfN7 wH+lrYTENcGtsQSwqjx8JFFPW2JlCSxOOB7t6tjAI6ptCT5O9a7dmvaNcZDaYBE= X-Google-Smtp-Source: AGHT+IFpJ07QZ468cZz+H4b0+wED6nysxjU6/1yUoJI7/D6+IBIi5z+GZjqWxTNkdSU2UKwsAbuMig== X-Received: by 2002:a05:600c:a082:b0:40d:8ff4:ea02 with SMTP id jh2-20020a05600ca08200b0040d8ff4ea02mr89344wmb.86.1706289350653; Fri, 26 Jan 2024 09:15:50 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id k10-20020a05600c1c8a00b0040e451fd602sm6287286wms.33.2024.01.26.09.15.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:15:50 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, jassi.brar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 02/17] spi: s3c64xx: explicitly include Date: Fri, 26 Jan 2024 17:15:30 +0000 Message-ID: <20240126171546.1233172-3-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240126171546.1233172-1-tudor.ambarus@linaro.org> References: <20240126171546.1233172-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240126_091551_839231_835C9BB9 X-CRM114-Status: UNSURE ( 9.01 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The driver uses GENMASK() but does not include . It is good practice to directly include all headers used, it avoids implicit dependencies and spurious breakage if someone rearranges headers and causes the implicit include to vanish. Include the missing header. Fixes: 1224e29572f6 ("spi: s3c64xx: Fix large transfers with DMA") Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index c1cbc4780a3b..2b5bb7604526 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -3,6 +3,7 @@ // Copyright (c) 2009 Samsung Electronics Co., Ltd. // Jaswinder Singh +#include #include #include #include From patchwork Fri Jan 26 17:15:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13532900 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D1197C47422 for ; Fri, 26 Jan 2024 17:16:16 +0000 (UTC) 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=7k5Il+/vPJ0WOWYTTBzBzvOzOUswFN8aMXrNhkpvqEM=; b=Rb4CmOLAN7vEhJ IUtZIvsKNWVADCcjsXYY3xGVZH4b2jvZcQvhjlwsTvhCLft2e0sRfO4V2avwEq9/q+Z3C7OSYE09R vo4BHF9/Y0aiJyMQPJio8XbS+k05dmpVnRbqABNh23H9ahey0eRzjza45WfEE+gmhtO9rk+UlUW/C Iop/TqI3S7LRLsUcWYGzL1ThpcUpyolBf+dWr8vKN7UU9AhGjFf58HHVtYBYRmyrJhPqr1ARig9X4 4z4/n97bCvK1azYKcW/hGYbxDyCyLy4Nq5b2D6IXyOkWAk+OrS62fDvXldO5CcnDqkDyLY+WABWKw St687OHSSylM5Q3djSOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPoC-00000004pWN-1Jpw; Fri, 26 Jan 2024 17:16:04 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPo1-00000004pPD-0V7S for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 17:15:54 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40ee82d040dso5840475e9.3 for ; Fri, 26 Jan 2024 09:15:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289352; x=1706894152; 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=qV8ITwl1O57QlGGOA7a30fekUIiUXq0J9XlHzcfvV8M=; b=PSy72d8VBdsUyFWBasmJU/8ff2L/wPNaivt87K16CJBYpSFidsMuyKsuf4SYxiQbEl OZWP6VL9i2SyVMYKQI+CVKu2dtZ8Ykkx0doYFKNnxscoFW6u9JUOISKKh7ZmrFErPne7 ESIcd2eTass6n2/mV0F9O3YcBbfkcM1LfWyZPIkSfEf5t3EGDHI8qgvS5Ns9JOkFuH5b znKfz6kPRksqBhKAIkjbSB+/VjrM7Ec5D8D9pGSABpqnzFH3yc0k1Ts8O8lUOAsgrh5F 99rQnwSRP74oGBZE/Ei2DRLwRaHxJpJCuLsAbsSoR/+0YXxFUN9nYQvkEUNTRLc7ffiI u/+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289352; x=1706894152; 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=qV8ITwl1O57QlGGOA7a30fekUIiUXq0J9XlHzcfvV8M=; b=QtD4X9vG89DkIpYJs/8MvRB+ULDbcxcuSJ1xSG5PgWmRVqx5ALiPI1D5049bq1CtJw Zj3YoTsbM07o2PLVMfh6VkfkqxatbFzJrvSxHjxaY9Bv0T4qaJsH+7C+k9n7gtDQHrOw lOWL9pPw8+xzDR3KGBKWpLL5ES+KcwABiK7LCXKzbtzI2x1nmw41loiAD7UUH8pfra+c +WzSXjjTrA4gbDYbxGQfbV+QdpZWj3Sp5PhlBXEWF8u20hm463IID41VzjtJTT3/5LbL os4H4k4L6yNY4J7GNQOYP0N7fBj3fibzk85jBrbbQE+d/KsaPFklhW+R5wIrZcOPtQui Rd2g== X-Gm-Message-State: AOJu0Yxqf8nZeqyzycWd8K+LobOb9C35FBRTXXRpKN/D5xq6vb/t1Ga8 ahIvyay/P1BTOKYKpYyzVwJNXsMNwggPWM+yj7qcfFEhMeBmLVlpGzx6o9n4Obc= X-Google-Smtp-Source: AGHT+IEvNW5DbdU8iWYCHzL7THeKzP8fEDzX/ESRePAImO9XzqkTKIuqDrCsNewY4d6xeB03PZgS4Q== X-Received: by 2002:a05:600c:378b:b0:40e:8bb2:6bcf with SMTP id o11-20020a05600c378b00b0040e8bb26bcfmr75031wmr.151.1706289351730; Fri, 26 Jan 2024 09:15:51 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id k10-20020a05600c1c8a00b0040e451fd602sm6287286wms.33.2024.01.26.09.15.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:15:50 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, jassi.brar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 03/17] spi: s3c64xx: avoid possible negative array index Date: Fri, 26 Jan 2024 17:15:31 +0000 Message-ID: <20240126171546.1233172-4-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240126171546.1233172-1-tudor.ambarus@linaro.org> References: <20240126171546.1233172-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240126_091553_203666_6F55424B X-CRM114-Status: GOOD ( 11.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The platform id is used as an index into the fifo_lvl_mask array. Platforms can come with a negative device ID, PLATFORM_DEVID_NONE (-1), thus we risked a negative array index. Catch such cases and fail to probe. Fixes: 2b90807549e5 ("spi: s3c64xx: add device tree support") Reviewed-by: Sam Protsenko Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 2b5bb7604526..c3176a510643 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -1189,6 +1189,9 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) "Failed to get alias id\n"); sdd->port_id = ret; } else { + if (pdev->id < 0) + return dev_err_probe(&pdev->dev, -EINVAL, + "Negative platform ID is not allowed\n"); sdd->port_id = pdev->id; } From patchwork Fri Jan 26 17:15:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13532904 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DF10EC47DDF for ; Fri, 26 Jan 2024 17:16:21 +0000 (UTC) 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=P8bSvpLhDcnZPxq5X3ts5B6ikbttJK2VCYq58VovOs4=; b=TCukyjMtCT5RTZ q7UMD7oWai46+oJaLGre0pzXWbAkHAsw3piyRhyTYfQHApDiO6OVsiESUkTFHm4EiqHKJbyBRwXvi R7Yk2/n84Tg4L7+mD0Tvo7k3t0tV1fHaXlNW42Q7xpdce8JGVey1PN09UcWhFz5ZIi22NXKeChrHw CilV7MLU++F6j3M5VsJhF0PPFP5gIGYO7h8h8YQ2EYRExZl20o+T6fbe2gVoy73Hi44kHJmBuGGp5 gdU300gZHpm5B/dXhlw/TlcfHVaylEWnffEYt2ZsoURM+kzjUr1Wl2Jn20X0xZUqEGiodjabQX/gJ wGdRS25cDHYp2EPVtI3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPoD-00000004pWu-0X9w; Fri, 26 Jan 2024 17:16:05 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPo2-00000004pPY-1hIS for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 17:15:55 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40e800461baso13015805e9.3 for ; Fri, 26 Jan 2024 09:15:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289352; x=1706894152; 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=RZyIu4b6YNe2wvKK+UomLqm5rV84CGo8FcGUcF1/2RQ=; b=ZU86YgrkV11lqEVpFdBYYcL/mYM2BS9JoJJvN1TqWdzotMtU+HHoc8AODax3L+VLc/ d8ZDr/jYN5noOjeCQ5LBlBVE2nf7Drj/xvC5PgALnU+ZWY0T9KesBfg2ATIPwc0aTfPB 4h3xQP0ooKqQW1qJCEckAJEu9TlvuApURRdMnIJVDchsvwKuK6buqucXTLQ5eytokj3m 8a65k9OY6w2jnMr1UM0Wkx6tmaDGjK/qABgacDyZs8q5r5iuHPqUHgMLA9y/UppEChJZ wBjbznJ3fGRa5OS5kVmKBFHVhgtx7FiueNNkKgwx9QABIzZpT5uGY/6NTVmn3CySExVt bNng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289352; x=1706894152; 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=RZyIu4b6YNe2wvKK+UomLqm5rV84CGo8FcGUcF1/2RQ=; b=iPlC2AiPb8tzlz/ZdShe+we+kYakaloeGY/awgyEJS2Zi2uplcIVWYIxO5j5fX8bLN XCxEJt8R9KRhz46upZnlI8LGINdlfPCwnjkbq4QK2NWcPu/+85cM7Vxxn456Mq1CFzvZ 4H23SUI5ZE2+gOKpLFkEQ6fOVX86RZCH2D+9N3QZYpAsz/MuOO4MWOJCrZrNzzmZ+KG4 GgiCx7jga+3VAvNgf+XH83iEA4flrHtqIf82ewTaSImuFSYBGz0kXWN2DifHwfPsEm80 r/ddRnbbioOFXxxRZcRf7G8xRQQ5H6HCBW7GBuJK5e0d1sKndEW+BGQmsyRKFV2yQA11 OYvw== X-Gm-Message-State: AOJu0YyeTHHYCA5SQn29d6AJbMGrc80jbZ5iMPfMTF6CbPuUGooon+59 OaM8M1o9aTBRq6GLvW9SWpiyue/yGZeKVCtl1dXCnyuyAi9O+ccSK1kYoXPAw6s= X-Google-Smtp-Source: AGHT+IGiRqB6KKdRJGfBC0XVbzCa+2WAHj0q2DYE1xYBRryatdCnKSiMtb1kLgtQZLGJlYfS6qjo7g== X-Received: by 2002:a05:600c:458c:b0:40e:3a6f:9b3e with SMTP id r12-20020a05600c458c00b0040e3a6f9b3emr57710wmo.6.1706289352631; Fri, 26 Jan 2024 09:15:52 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id k10-20020a05600c1c8a00b0040e451fd602sm6287286wms.33.2024.01.26.09.15.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:15:52 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, jassi.brar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 04/17] spi: s3c64xx: fix typo, s/configuartion/configuration Date: Fri, 26 Jan 2024 17:15:32 +0000 Message-ID: <20240126171546.1233172-5-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240126171546.1233172-1-tudor.ambarus@linaro.org> References: <20240126171546.1233172-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240126_091554_472965_5702E408 X-CRM114-Status: GOOD ( 10.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Fix typo, s/configuartion/configuration. Fixes: 6b8d1e4739f4 ("spi: spi-s3c64xx: Add missing entries for structs 's3c64xx_spi_dma_data' and 's3c64xx_spi_dma_data'") Reviewed-by: Sam Protsenko Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index c3176a510643..3df4906bba34 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -180,7 +180,7 @@ struct s3c64xx_spi_port_config { * @cur_speed: Current clock speed * @rx_dma: Local receive DMA data (e.g. chan and direction) * @tx_dma: Local transmit DMA data (e.g. chan and direction) - * @port_conf: Local SPI port configuartion data + * @port_conf: Local SPI port configuration data * @port_id: Port identification number */ struct s3c64xx_spi_driver_data { From patchwork Fri Jan 26 17:15:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13532902 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4A3DFC48285 for ; Fri, 26 Jan 2024 17:16:18 +0000 (UTC) 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=2bRYhHe6+7cT/cI8XzqLnFGNrBRRKIDB946nwp9Gnq8=; b=y9nnkfVwTCnwAs 5HWa2Hy7N7ZKERkAcvRgp7Yg4Yaxczd4zhtm8y+V7d8jT0syM333nqte0d+F7PNsOOMoWJzkdsv4g GjcGEMzQujz3atjbUHBBAvOChmupFMNE7kcF8mkkKQJOuBq1VkO45B0UJQ+OiAG05Fl/eoOAxd3xM XAyT7kVRhDQAQcd6B9zp8QsET5SL2j4j8dTTKKYsn9TtBlXCVBxB0u9VNvqfl0WmTIhSmK004SYap HA8m9rn4Sfn41OLA46yLWej2ZODNS8g+ZKdIpAV9E8UETSrJbqvg1FZYiB9k/cSNz0CfuOpgAxI28 6W3gG3015uMptpuUxiyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPoD-00000004pXf-3Kta; Fri, 26 Jan 2024 17:16:05 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPo3-00000004pQb-21wm for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 17:15:56 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-40e800461baso13016295e9.3 for ; Fri, 26 Jan 2024 09:15:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289354; x=1706894154; 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=00eMbYOiFNSGCFFZhUzjrYBfwNvjnqx8W7WtHq0mAcI=; b=P3/dYFtVGYg07zobhZoxFEwnN+ZNAgOoVc0gN6NacQ393StRMd1d7b+b7JqPz8viO5 ld932Z04zyb6Mnhbelptwo44A/mHl2upLUQ2snK+vfHJCdsAi4kG5kKVUuEHkuwWEFtR u9kJbqWqW0hyrFHZkScDJpOXlPjAWgs+guRUT+WHgCIzOCoChUXwofYE8k9/vtNA9g7p 948vwUWFpeoYGBcPS4ux9IBVJDPWMRwQIVNIZkjJt+9rBl8jxsoVAVmjuWtVRYEGiJL4 zGwdf8f9ULwyLCZuRusM2f1KFQuodJXCBlJoqO1ztAwcQIopUUgsS9jgn8DW3+nd2EBl cyCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289354; x=1706894154; 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=00eMbYOiFNSGCFFZhUzjrYBfwNvjnqx8W7WtHq0mAcI=; b=UfLvWKaw0itRp9l5TRu2Qvx8kYsB35ITzRwBk8sckKGm19b2QHLxj3nv5P4ipCdbL4 krttSyLgKAzES9d/zpMj51yLoyUdWqbhVm5Gb52o0l/DaBEgu+TXTGa8k2RqYSEgArli yPLZVw6/p1bAVdRFCE43rnI3vMqydw2ayx5lAuf7ey9G888VzBSHD8+xkGfOKQWUu4a2 f5o+yijk+rAr3py2O1R6I0J3CvAs2przwW/6afPR9k3B1Ec6a8+ITh6NY9Z/vfvAzSW2 DjKG70sw26WAlRExhhC7+/tjxQkjSvcZ0+SeaVfbsTDdPHHH9S+U1hucw0u42j5wPDdf 2Riw== X-Gm-Message-State: AOJu0YyrOl4Z2zCzcouvynd/SaKkSM5ur+lYXnFQoWAvr5nEljlo0N0+ EwxwIjHNYRSISpTsMR8lFSDfeBChwhTEWhnU047fgIuZZN68xoHKYHvmVO4dD6Q= X-Google-Smtp-Source: AGHT+IG+EKYw0gezAOASZpCMY5zJ1wkPy9c3Np3/+vChbo3+maOv9w50JzJ+NuLYQKEMU+yB1LQEEw== X-Received: by 2002:a05:600c:1991:b0:40e:c52a:c3a0 with SMTP id t17-20020a05600c199100b0040ec52ac3a0mr53478wmq.198.1706289353913; Fri, 26 Jan 2024 09:15:53 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id k10-20020a05600c1c8a00b0040e451fd602sm6287286wms.33.2024.01.26.09.15.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:15:52 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, jassi.brar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 05/17] spi: s3c64xx: sort headers alphabetically Date: Fri, 26 Jan 2024 17:15:33 +0000 Message-ID: <20240126171546.1233172-6-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240126171546.1233172-1-tudor.ambarus@linaro.org> References: <20240126171546.1233172-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240126_091555_562119_7A26C8FA X-CRM114-Status: UNSURE ( 9.75 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Sorting headers alphabetically helps locating duplicates, and makes it easier to figure out where to insert new headers. Reviewed-by: Andi Shyti Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 3df4906bba34..ccb700312d64 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -4,20 +4,19 @@ // Jaswinder Singh #include -#include -#include -#include -#include #include +#include #include #include +#include +#include #include +#include +#include +#include #include #include #include -#include - -#include #define MAX_SPI_PORTS 12 #define S3C64XX_SPI_QUIRK_CS_AUTO (1 << 1) From patchwork Fri Jan 26 17:15:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13532906 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 72B31C47422 for ; Fri, 26 Jan 2024 17:16:26 +0000 (UTC) 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=TtNWGxMO7VOlpGLP0uvaVMz6drXGeZx2Eucear036pM=; b=pdb/EIfJyZr7mQ DPA0qGVdziicUoy1cYAG9STEit8WplAx6V2yxJC6FUaA7j/dOXg2jF241lbu5yG9oY5yGz1NWa95u qZqgH3XgmyDFWVTqqiewyxjvXIwZLZx9cTD9CgDL8vAcwRLp+bB0fibMXuwv1/owxThPkVJ00CdTK r5lKnZKFk66zZJMuR3UodVcx1+HoKIsvQTQ442qQMti4ossOzE7wjLaXd/FNB/dBq1EKtsuGz/4Ww j9nBLPwMAdXV7YpF0Wnvzss1/ohhgZHtlrpXzda9PSR/YnTmS/l1/dYay/J0eR3hgt059jYTKU7sE py/cGm8sGirwqurxrV3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPoH-00000004pbe-2tOk; Fri, 26 Jan 2024 17:16:09 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPo4-00000004pRB-37w1 for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 17:15:58 +0000 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40e7065b692so9306025e9.3 for ; Fri, 26 Jan 2024 09:15:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289355; x=1706894155; 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=5ltiFYCSIhgmUya18eTjqQJ7jz6+WhmArMeXn4kQ+FI=; b=L2fHGWWaDJN70nS+0kIGCpCsm7iXh+ZAPbv92cXF0GdrmTM4sdjnAf6oxX9a2/UY/Z X69h5HbpI0lkUlfLZuEKuG76VUQEMh5sKeIvit4znMhriWpehaafc4MYJ8Znst43J0UE w/BCjaZxWhnx41k7WaMPgf9SYZZ6Sp8gQ++o2fNFjJ6LKEpBHhRmx/YsOSXCkeegUFwR 3zxEGGUtocPFKS1AtbImtcvto2RKkUA+/AThcvxDeo8PoyQuoySicpqqD/iCzUi/Imm4 6ktM+hpSlrHSKyBbnHkJ85hZG2OJRuOuukl5VY+rIunUMWJdsJ05BLN03zXNE5gpikCZ Loag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289355; x=1706894155; 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=5ltiFYCSIhgmUya18eTjqQJ7jz6+WhmArMeXn4kQ+FI=; b=qiwdqj52ceIewZrTd9OPYBlSK30rpyJp8IOH7MOchV2+Z5zpLa9rfOCUzxg8TIVFqC 9Z5WatmyKLkjLLyl5SM8WVjKlEPMmkKi7DNsMGGHFiocr0FOKu5ddJHFnDg0gaixmLCy DFnyI01lqqufr06ydkPCE2q0TTb00krgFWfZ6pAIBiWAqpyzhErazsK3fjbVrwjC2Emo l2Ybt2oKE53KpohyN+lINj5Zqgng2HKCp9zUy/yVLLpANRMuLHKZYBfVGXnA8xUJEayk wF5GtVylwy3Eti6Ml9WgoEEN3u5apYKIF6hNmWFqtW6n+Shl/sMLmya0+D2+Owp0pBJh pr7g== X-Gm-Message-State: AOJu0YweII5X/owUBUu2y8SW/dAudONRlQbqfbs0fsGU3+coYS5aYip8 in67d45XLppBIBgkdzu1R3QrWycY0hd6IJf3OyngBwf6igpCBNupIVkZQZngP1Y= X-Google-Smtp-Source: AGHT+IGXyL9t9hz0rG7kmzfIGdhxA4l+IpUxFH4k8alwPjXlpgx8+SYwtpsf3ubKNpcU9Hrlqka7uA== X-Received: by 2002:a05:600c:9a5:b0:40e:7d37:5fed with SMTP id w37-20020a05600c09a500b0040e7d375fedmr88633wmp.78.1706289354869; Fri, 26 Jan 2024 09:15:54 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id k10-20020a05600c1c8a00b0040e451fd602sm6287286wms.33.2024.01.26.09.15.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:15:54 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, jassi.brar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 06/17] spi: s3c64xx: remove unneeded (void *) casts in of_match_table Date: Fri, 26 Jan 2024 17:15:34 +0000 Message-ID: <20240126171546.1233172-7-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240126171546.1233172-1-tudor.ambarus@linaro.org> References: <20240126171546.1233172-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240126_091556_821469_A4D7817D X-CRM114-Status: GOOD ( 10.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org of_device_id::data is an opaque pointer. No explicit cast is needed. Remove unneeded (void *) casts in of_match_table. While here align the compatible and data members. Reviewed-by: Andi Shyti Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 45 +++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index ccb700312d64..9bf54c1044b3 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -1511,32 +1511,41 @@ static const struct platform_device_id s3c64xx_spi_driver_ids[] = { }; static const struct of_device_id s3c64xx_spi_dt_match[] = { - { .compatible = "samsung,s3c2443-spi", - .data = (void *)&s3c2443_spi_port_config, + { + .compatible = "samsung,s3c2443-spi", + .data = &s3c2443_spi_port_config, }, - { .compatible = "samsung,s3c6410-spi", - .data = (void *)&s3c6410_spi_port_config, + { + .compatible = "samsung,s3c6410-spi", + .data = &s3c6410_spi_port_config, }, - { .compatible = "samsung,s5pv210-spi", - .data = (void *)&s5pv210_spi_port_config, + { + .compatible = "samsung,s5pv210-spi", + .data = &s5pv210_spi_port_config, }, - { .compatible = "samsung,exynos4210-spi", - .data = (void *)&exynos4_spi_port_config, + { + .compatible = "samsung,exynos4210-spi", + .data = &exynos4_spi_port_config, }, - { .compatible = "samsung,exynos7-spi", - .data = (void *)&exynos7_spi_port_config, + { + .compatible = "samsung,exynos7-spi", + .data = &exynos7_spi_port_config, }, - { .compatible = "samsung,exynos5433-spi", - .data = (void *)&exynos5433_spi_port_config, + { + .compatible = "samsung,exynos5433-spi", + .data = &exynos5433_spi_port_config, }, - { .compatible = "samsung,exynos850-spi", - .data = (void *)&exynos850_spi_port_config, + { + .compatible = "samsung,exynos850-spi", + .data = &exynos850_spi_port_config, }, - { .compatible = "samsung,exynosautov9-spi", - .data = (void *)&exynosautov9_spi_port_config, + { + .compatible = "samsung,exynosautov9-spi", + .data = &exynosautov9_spi_port_config, }, - { .compatible = "tesla,fsd-spi", - .data = (void *)&fsd_spi_port_config, + { + .compatible = "tesla,fsd-spi", + .data = &fsd_spi_port_config, }, { }, }; From patchwork Fri Jan 26 17:15:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13532905 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 30CD5C47DDB for ; Fri, 26 Jan 2024 17:16:26 +0000 (UTC) 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=DRmzXij9A1TVI2jpvWOY0ZvduhnPXsbo/oHFQN0thdw=; b=n/eUuqu5BQavI8 /woR7WRMAyUNlDz73uC8pGWJ6Lf47F3+M/6TlhXGQ5P0mm43SBmT+UKcy62gTyBv7+hpIjwHRvHIm rwX+U3NzbZoJWeWuR6+q6A//BbEeBomFZ5n8eONr+aGgPc9EKPCGY7sIMo1VF39BEJbt7kgxQoPlK NwoHD/Mog1liQKn9Q/OuXqkz28wewDynmIiWUvC1qkp36nWr0dx2foGYul3iM0Qv5ViHjWtvkAV7g k7E9t1pEKBk6sZXdCBx4xbE17u3EMAtZwHm5Xn2yPSOghY5T8ebSdKLKFzSmFtQjg4roM7EQxsnc7 qzxO0gr/53wlpLj/GigQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPoN-00000004phJ-2WBn; Fri, 26 Jan 2024 17:16:15 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPo5-00000004pS2-3GgG for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 17:15:59 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40e60e137aaso14174585e9.0 for ; Fri, 26 Jan 2024 09:15:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289356; x=1706894156; 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=byLqjPGX2U9floq2ktVuyo0IP+fRFNCCMq67reNTymU=; b=cWSYUwCisLU64Ff24Icn54STdWBMLqNTauF3PVnCfZvDwKk+xigvUmM9zuZPhQiJR5 z6/uSki/8BQ1a8Iyk/hy4xFhdRmtHrLNrR64xljrIDJGHOWOhSiPSqc7wiaUdznD8obu +XD76S9g/xF+1j2aRkLvDsst/5+QEZWPEugPW+hmxuJJrO6AJMdEjH2c75p5d5/DFpnm vAY+FwbJS4EaX4Q/CG/kI8k2k0pITCrbIZVlxegRuCuvwdO1aByFsxPJtKKbDlznp2v0 EiC42EoEekGqWgvcufEXsByqw+4drLrKNtLF5fmq6mcaUgqS9gWXQbWAgnXUYjmFInh8 RQ6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289356; x=1706894156; 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=byLqjPGX2U9floq2ktVuyo0IP+fRFNCCMq67reNTymU=; b=OBErVH3w6R8Fo0mczHLEmNPvUhVmeojJQxlno770Rlc/ghHLy98aGpAhXcOEWTsYkl 19Ru8N/RlEk3kQL/4I+/swMqqbWHpo533zxfskDUbmKkktU3ceA0CD+MBVLWLYX009xS 6ix96gs+SF/n3AcoB5wppt5KG0L4DYJSDhWqQMbot+jEwX8mPx6qeqIlWWMzJ9pZgHA3 EWDTcHtbrIiX2FEp3TKPW92U1BAjtA/xx3MSDwAMKvQPidU0tGk2ogWQRixqAwEgj+Jl /T9U/shs7g16m0gLi3hJQNcZqc9yfolFckemphOROCBQ9ZO12XpR7831Dk0uM4VxqCmT 5jxA== X-Gm-Message-State: AOJu0YxVnZdhePWEHWpsSGbWoDk95tbfYXBJdXo81K6xkcWPs/L/umCU rn6kyYgS32w9qsFJJT6Ic/yY6B9HfA/4ejOPypbIeEpzoa2YVVxSjyhuaJ0XcLg= X-Google-Smtp-Source: AGHT+IG83hVVkWCOFUgF0c27tv+I8VxsYGHb2dXyr0ioweVMaw0+DSQAY0Eif9VfosCOeNfsa8sQKQ== X-Received: by 2002:a05:600c:4fc2:b0:40e:3edf:1053 with SMTP id o2-20020a05600c4fc200b0040e3edf1053mr94867wmq.17.1706289356632; Fri, 26 Jan 2024 09:15:56 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id k10-20020a05600c1c8a00b0040e451fd602sm6287286wms.33.2024.01.26.09.15.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:15:55 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, jassi.brar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 07/17] spi: s3c64xx: remove else after return Date: Fri, 26 Jan 2024 17:15:35 +0000 Message-ID: <20240126171546.1233172-8-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240126171546.1233172-1-tudor.ambarus@linaro.org> References: <20240126171546.1233172-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240126_091557_843347_A6B2B83E X-CRM114-Status: GOOD ( 10.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Else case is not needed after a return, remove it. Reviewed-by: Andi Shyti Reviewed-by: Sam Protsenko Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 9bf54c1044b3..bd2ac875af59 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -407,12 +407,10 @@ static bool s3c64xx_spi_can_dma(struct spi_controller *host, { struct s3c64xx_spi_driver_data *sdd = spi_controller_get_devdata(host); - if (sdd->rx_dma.ch && sdd->tx_dma.ch) { + if (sdd->rx_dma.ch && sdd->tx_dma.ch) return xfer->len > FIFO_DEPTH(sdd); - } else { - return false; - } + return false; } static int s3c64xx_enable_datapath(struct s3c64xx_spi_driver_data *sdd, From patchwork Fri Jan 26 17:15:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13532909 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DBA05C47422 for ; Fri, 26 Jan 2024 17:17:43 +0000 (UTC) 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=b4qcwn/j8RhUF2p2oHyghwh9O9JPqkVQ/Ee6yPIFWR8=; b=j/sthUwGyGfvl6 cR0+LU5yGX+0Im8nZrbmI814t5bq7DnP0xX7l2qNoLipyrapHa5jAgomNn1PiFkzXJygWbxkCEs4L TW9eTJKXcB1bg2tEMnU9aRP5PFyyLyt5PmONWDb8p0ou9JH1v49nH5l17Q0JK0TFT88rWDCIOAs8+ 8spzNEcq7CjvhDyE3L80UkLaw1e+bVKSTfPpF3t9UT/oWyCI2BOHGw/YemP3lovDRHzphs0mk5L7r kKhQsI4yh6irXddaQzh/63JKNP2c3osfNy+YekusnNJHhYa37t5wbQrYcyDnNhWNnzsfJEwYGuUoc WJu/IEyF8eQQJBFn6+CA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPpa-00000004qPu-2UI7; Fri, 26 Jan 2024 17:17:30 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPo8-00000004pSd-4AP1 for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 17:16:03 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-40e7065b7bdso12372715e9.3 for ; Fri, 26 Jan 2024 09:16:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289357; x=1706894157; 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=y4xVKWwugYgGoHizGIdwlg/22zyZrS4EMqmySuw93Sc=; b=v6GtdRlJkShirfnshY1TB913ykWvtjK6PKiSUtW3TtOJxbNiHGY4eIeL9S+uut8aXc uqX8/PX5TH5xi49RxcNBEiT/Oh4MwT6qX3ckAE0c1LLR0b+RFSnuNcWLnSkERWboj/B6 st2ds1WTnZKkckbVK4++KmjIf2cdHaemH8Vjzg/uUK68IOpaMGl9ToqLp/5mQjHM9ol6 VoOGyZBMt78gnZlZJ9ecTg6u7pwoxMSUFq8SFcwC9mZDUdEWpokgfKOBSn8JMiE2NtLa aV5p9tCjezzzcToADsf2/+iwxhH5/qjhJoscIXGZGtYYqerNuXLBA70ulJ0GO6sZH/py ZCOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289357; x=1706894157; 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=y4xVKWwugYgGoHizGIdwlg/22zyZrS4EMqmySuw93Sc=; b=cgG3UNQA1wlAfFRsZEophXho+wLktGhcVrJY8GoEIjIaKkEen3igHMxuQoJY8b/E26 exDMt8SMZzCYBlQFv0i7R3b1TO2qlWqxx1SG94W7rMKjFUfHO8I9mlAaIiKvD1mLYMEk u2tCrisznPC7I8Se+SDydUlv/JrJ8EflpN0AQE78p/20hLF0wQ2PQ4BP2mjtV7YuTIJ8 4HDE9Pv70n/1EC3sENQOLHWVJwlSN+supE5j6kroRQpoi1muAVCEOjOJUbD+d1CjxdOv 40LFWh2xPPHZ+ieSLCdDTzCqRFI1jHCQ0K9vm+5gcDbWw4tCk/F8b5d+sZPsd6654pd5 1c8A== X-Gm-Message-State: AOJu0YwJ21E26jXQd6goakVKZrv3CWQik+dEWr16A4/quDUFGQaDwVIJ RSXZTJsvUlEldzqEjTqzjWgwHtTR6PxUZ/GKgD3stD9aVSxhLUTMvuVsFxZA93Q= X-Google-Smtp-Source: AGHT+IEXhDE4nufHz0/LUuTfSrWjuCL+iH1BoKlo3v9opQn+OxuMuntV4aZh2UJOeFdGIflbLzWWYQ== X-Received: by 2002:a05:600c:3144:b0:40c:2417:3b51 with SMTP id h4-20020a05600c314400b0040c24173b51mr73223wmo.74.1706289357772; Fri, 26 Jan 2024 09:15:57 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id k10-20020a05600c1c8a00b0040e451fd602sm6287286wms.33.2024.01.26.09.15.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:15:57 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, jassi.brar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 08/17] spi: s3c64xx: move common code outside if else Date: Fri, 26 Jan 2024 17:15:36 +0000 Message-ID: <20240126171546.1233172-9-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240126171546.1233172-1-tudor.ambarus@linaro.org> References: <20240126171546.1233172-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240126_091601_561220_6C0831BC X-CRM114-Status: UNSURE ( 9.89 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Move common code outside if else to avoid code duplication. Reviewed-by: Sam Protsenko Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index bd2ac875af59..bbbc4795bcbf 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -291,20 +291,18 @@ static int prepare_dma(struct s3c64xx_spi_dma_data *dma, if (dma->direction == DMA_DEV_TO_MEM) { sdd = container_of((void *)dma, struct s3c64xx_spi_driver_data, rx_dma); - config.direction = dma->direction; config.src_addr = sdd->sfr_start + S3C64XX_SPI_RX_DATA; config.src_addr_width = sdd->cur_bpw / 8; config.src_maxburst = 1; - dmaengine_slave_config(dma->ch, &config); } else { sdd = container_of((void *)dma, struct s3c64xx_spi_driver_data, tx_dma); - config.direction = dma->direction; config.dst_addr = sdd->sfr_start + S3C64XX_SPI_TX_DATA; config.dst_addr_width = sdd->cur_bpw / 8; config.dst_maxburst = 1; - dmaengine_slave_config(dma->ch, &config); } + config.direction = dma->direction; + dmaengine_slave_config(dma->ch, &config); desc = dmaengine_prep_slave_sg(dma->ch, sgt->sgl, sgt->nents, dma->direction, DMA_PREP_INTERRUPT); From patchwork Fri Jan 26 17:15:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13532907 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 12973C47422 for ; Fri, 26 Jan 2024 17:17:40 +0000 (UTC) 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=z6qGhxP9qhSyRxDMriMOWwV6eWu0R0m9sukBUTik8NU=; b=zacwVNtHF9Q/G8 KDBznr1g/lfD6zbbUYNG/euE+Ui7Os9rsdV315dEiqszCqKoEWyDtMBlmyuHq400VBPS+VChe1Vqn ASU9WP7J5EAOnYiY/kWGLa7TVunyAstxXMH1Oom5rkb0XeMmNyA0sSs9LOFm6wNvYwo2qSYpePk48 AdVLOYWqZExNrgM9g2iirFKE2O7TBp1wXQgoZsbZMg0YeyFlLwIKr5z9NtsINXf5O0fz7mDwPCOi4 1LJJnXPdgU5NGjW6LUgPR/KEpm43N3BZAdgKEMLtpwXbVxDbJz0rVjBAYdZHHrhNVI3fST9EJc9IR k0W9WgA65n0QGiKjHMmA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPpZ-00000004qPl-4BPf; Fri, 26 Jan 2024 17:17:30 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPo7-00000004pTC-3mCx for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 17:16:02 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40e5afc18f5so9672215e9.3 for ; Fri, 26 Jan 2024 09:15:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289358; x=1706894158; 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=8PFQQe5L+S81TOMoMYxe1V5Ktq0fN4GeqljJCUbv5w0=; b=HAXZwM40Vvutr5PSjIfRJYE+R6llOT2ZwL+U3VTgujETMmo5cVheZGEwfl/kiayxtw itjoUb6EalcSb1hhChZbMV6WlYROaZjSCpN8nDZVf6V1AzUPGp0euAknde3lMEV5a34a X8Nc/Ce2Iijo4rdlVfpAEyH02ZfItUNK6qacKr1liRyfG6vbgAabTtZoueLCi/U/6qa0 cDQLoCMtbu8U6GxhN2eKcIoQsWUogK9xRhXH6LFj1JT2RerzGtgoY832bXoIF7DEyNy5 qpdhQRd0KGhN8QxzoSCCt9788OGz77E4dkh0YvN35twt9bkLrxeF6xy86ajv3eio0kNe XWvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289358; x=1706894158; 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=8PFQQe5L+S81TOMoMYxe1V5Ktq0fN4GeqljJCUbv5w0=; b=F4m1bwmrv893nwtvfsf94zT6nsxMO8JGrQJLfgWdFMJckLKQqwxWbkjxgpKVVheIcG 7oHmxbEZH8woEIBHlzFNFxGHWHgVd9aaJ5HUFlZ290QjtlqL1aGoyUrPOks2LeT2Evov LHMZrAYrgckh37WPZ7Jdf2LpQDadW5lErb+oBO3WArhMu8pk5pS5gSdLIoEX/sMbK53q 36/ke/x+NIau9Lq+n+e6LJ0bZrexK4rWbTH7dMaRihhlFHY1jq/vzANy5ozRnPFkAjuq Ql9jB3a2LKFveIUmXGqpBicYGHDHst1AclTBZJjqmpfcMEctqIa4XOhSsxx1hYIgovk4 AP3Q== X-Gm-Message-State: AOJu0YxCUSv0IzpIbPMbz5L9DijokMj1EN/w6QZxkO80dTaCOXjx8HMj iFzdeOSIHVt9xqU6qbXg8jkrfnH65aOx7XPMDw/fzQAmKC1mUYfzMWLRUqZIoyg= X-Google-Smtp-Source: AGHT+IEdSfPk+mvqdxvejpoS55NReR4Yc3ryLjfI8k+oBOGs8er5l4B2FW/n7fLGQj8APyuuYj1CgQ== X-Received: by 2002:a05:600c:1d1b:b0:40e:60c3:c327 with SMTP id l27-20020a05600c1d1b00b0040e60c3c327mr97121wms.1.1706289358674; Fri, 26 Jan 2024 09:15:58 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id k10-20020a05600c1c8a00b0040e451fd602sm6287286wms.33.2024.01.26.09.15.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:15:58 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, jassi.brar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 09/17] spi: s3c64xx: check return code of dmaengine_slave_config() Date: Fri, 26 Jan 2024 17:15:37 +0000 Message-ID: <20240126171546.1233172-10-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240126171546.1233172-1-tudor.ambarus@linaro.org> References: <20240126171546.1233172-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240126_091559_961666_D9FFEDA2 X-CRM114-Status: GOOD ( 11.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Check the return code of dmaengine_slave_config(). Reviewed-by: Sam Protsenko Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index bbbc4795bcbf..6268790bbcff 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -302,7 +302,9 @@ static int prepare_dma(struct s3c64xx_spi_dma_data *dma, config.dst_maxburst = 1; } config.direction = dma->direction; - dmaengine_slave_config(dma->ch, &config); + ret = dmaengine_slave_config(dma->ch, &config); + if (ret) + return ret; desc = dmaengine_prep_slave_sg(dma->ch, sgt->sgl, sgt->nents, dma->direction, DMA_PREP_INTERRUPT); From patchwork Fri Jan 26 17:15:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13532911 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E6A7BC48285 for ; Fri, 26 Jan 2024 17:17:44 +0000 (UTC) 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=n7NeFOCbyZTyxsoc6urA0Rsw9yNyDUFAske1t0Yq4Bc=; b=HdXRiBYAeKjZJR GHkrq2QBC4NI+WWUXHMZjb3tNaWUrvl37g1mjdo12DvXmDcE95COo7ZqM1e69OYNQsdYWeTkCG8wz BiR5BtN41ZdFjo/sytmjfw6WVfO52RkyP0Szw08QOG/cHuhboOiF7nOt13H2zqK95K0UYTa7bAMpZ 3V9OB7ltTw+89Y0yEiLtg7zCSiBpZxcCerz4IqAQXlmLamz4W8so4QdDMnAOpftxyegbA4wuEOolM kr3bEdKS1xndKj+yClGTnyH92BJZwvoYzJeSEUpRaOe40J5UQMyIBBZ+Kx2HfUvwVvVtJA9oa1SX6 QS+soStMzeyhPiCRdC7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPpb-00000004qQy-48NV; Fri, 26 Jan 2024 17:17:31 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPoD-00000004pUm-3LyU for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 17:16:08 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-40ea5653f6bso11005325e9.3 for ; Fri, 26 Jan 2024 09:16:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289361; x=1706894161; 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=OFdCZ+E7BFUbmZ2dzvoSTWD6D1fnBZ2RDi/MQ7bu2EU=; b=NZLCf2QL7YdG279bRC11d0ciwGs6HxdPLwYKYWGE4HRXtxWBIleIyydstbE1cxD1MN 8z5m7lM4MWnZ3gs8/vL49L9QT9VVw2VOKcdkArCPWz/tft8FjOh6YGRSZOU0yyFOZ/SO cPHRrdski/QBNQcmVnH7k9yK+oZ3NvgJiCni2v8YC+ej8OyASsFtb31O+wup6VQ8mqtq f81AZFgdtxL7MISJa2oYlghAWqQQTcMtTvIc6MFvGxNoj+aoVT7c5FXCaz1cFq5CFqbp /ES7RjPcsSMyyeGp+qf5ySR2R+JDOORXxIueJPANbgU2RJvqP/iHQfyR7yeSNBPnweM5 ivzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289361; x=1706894161; 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=OFdCZ+E7BFUbmZ2dzvoSTWD6D1fnBZ2RDi/MQ7bu2EU=; b=n+xkGhgAwR7zU4kej7C2rXnVxM79zbiM0LDxbwfr3pXNcKPHu3GA4XyrytuML+Lgh5 8FEckV8MYvIbZNlFvGOu45STxjr6unRWoEk7eapvcwxdfzSUZxRSsE7C0NcxzdPNT/ti MUiV8vdGF797l9Jd5xZTcJjYqRhgXXZ7ng7KJmYhYmPmVc09exTby1oJDT8WNh5HpKuB xQiOCm4VWpSlF8qtUqpooH77xrEOTX/pHwmcqfFeCvp0B4Aidm+Si/mYMotbmhujrFe8 PC2R8oyZWQ4HKX3SKXDRYvpRJOGCFH3hYvJp7T0EnqlZlia0iqkHXfLUfUJ57Pw2T0/F 5j6A== X-Gm-Message-State: AOJu0Yz0g/xY/IvkHWvKfiL+zr0WubAamcwYElYjod/otRILeh2l0Glq XANPkKt/7GMTzX4F7ruOhn6yOMYV93eBZvtHswV8EDgw44zYbG5YiSplDOsCesI= X-Google-Smtp-Source: AGHT+IHAdoE7ZY9wf1qj3d+JD3BcLNSbHlFCODLChuw3+wfJAwKowp+5DxpzG8f1Cx3S5gdIKHCLrQ== X-Received: by 2002:a05:600c:3ca7:b0:40e:62b1:58a5 with SMTP id bg39-20020a05600c3ca700b0040e62b158a5mr90288wmb.15.1706289361429; Fri, 26 Jan 2024 09:16:01 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id k10-20020a05600c1c8a00b0040e451fd602sm6287286wms.33.2024.01.26.09.15.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:16:00 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, jassi.brar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 10/17] spi: s3c64xx: propagate the dma_submit_error() error code Date: Fri, 26 Jan 2024 17:15:38 +0000 Message-ID: <20240126171546.1233172-11-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240126171546.1233172-1-tudor.ambarus@linaro.org> References: <20240126171546.1233172-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240126_091605_908749_2B09CEDA X-CRM114-Status: GOOD ( 11.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DMA submit should just add the dma descriptor to a queue, without firing it. EIO is misleading and hides what happens in DMA. Propagate the dma_submit_error() error code, don't overwrite it. Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 6268790bbcff..64daf944b245 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -321,7 +321,7 @@ static int prepare_dma(struct s3c64xx_spi_dma_data *dma, ret = dma_submit_error(dma->cookie); if (ret) { dev_err(&sdd->pdev->dev, "DMA submission failed"); - return -EIO; + return ret; } dma_async_issue_pending(dma->ch); From patchwork Fri Jan 26 17:15:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13532908 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E8508C47DDF for ; Fri, 26 Jan 2024 17:17:41 +0000 (UTC) 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=YgWPXDA1xHP0EIDQgwXGaROG/XRkYoESE8hHn+WH8W0=; b=KmnpW9aX0tyNvj eyuAhwsEX978fhW12/+Q1pK6LWC/pOqFUsSHz5SZp/nezsyHVBr+Os05Z67bcjsLY6+nUn0xiAJ1k dO7fJCezCQkerv+Yml+XcwycjPlgY0vLaLHdm+ZssHYhfy/EqAF4d86yCLZZdcB2XFBkcjr8JpROs CAXhtL3vDJGhkKxHBbARhpua3W/kjpa6lO1magBvWA3wqkIqO5duYpDoBeXDrA8KcTPQmtoTe0FMD kx0HmorYyvPlxRyqYHIdhKmxSP/AFV20qPzz6fC8pTatIhHOikUq7YokBE6uYBRr6Jvv6VmtbfVCb XgVuX8/ySW34VuWij0fA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPpb-00000004qQb-1Nci; Fri, 26 Jan 2024 17:17:31 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPoB-00000004pVW-3RkJ for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 17:16:06 +0000 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40e7065b692so9308265e9.3 for ; Fri, 26 Jan 2024 09:16:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289362; x=1706894162; 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=JaPg9S8ljvJnMWoVxzFt5cFSPcbWvq/ipc1ZxlzFBkk=; b=LA4qkrTpcVrKTwXqVasZy4E9ccOAsYVVfsKSO7yR9UvLyJgIYAjgINM3po78q41fZK UTPE6AmLQZDd+Om4eoplrfyGkUbXZciUbBONAu2Sent1dR52vDfcdgc5yDhvHRxKSKSs 1GMtFs91fWmcwfBIf4ggRYvj0Q+jydX1e9VVY2edfaQj+sMYaPhl9GD8fohIjhPLqX8m HCU+f92c8QhvuJf/O6ONSTIAJpCRjJ1NdAVxFCN+qOBH3YCiQ306JThYV+o6r3zuMG9F Q9ytI8H00GMfbiDwZxIhr25QzpqYJhFGk1N7CILVYvswNLJvi18XbJkjVsF3id0JqycX 0rYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289362; x=1706894162; 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=JaPg9S8ljvJnMWoVxzFt5cFSPcbWvq/ipc1ZxlzFBkk=; b=PU4uBbSvk+CWYOhO2fjbCI00jnJHU4tJHjZAmyAdd6pitddAxASaJf4REF/AJ0gYxC F97duzMfaF+2qqKHUR3q6AUfCYxJh6ojDxDM5bsceX0Ofl16395VVWU8xtyXB0W7tRak zNd9S8F+ZROo0CVrVFAsh1LAswz8cRUboy03hYiQahbG1FUmAevrGLzvmu8igCvURbuM 57A3uQeqO0P5q4zcsdcQvauO8FiY/TmwYXrAODlJsOlxjW4CiFxSVnTo01evjijLsrTU Qvk3dqZQmSZRtyoPjUE3zVvtfRXTWQ+UZJbQlRzCCApWFfXbmAD9tqjDy6oADnJxLj8k GE0Q== X-Gm-Message-State: AOJu0YwhudeTIR17C6DDo3fVxrPx6fLKh52POgmunVL2RpWVtzLeC5Zh VcdnQWbg0UloO5Aq/fdpT8jfm8IfQeaxSg2etoeokcQLFI7+hrCBA2rleqxkKqc= X-Google-Smtp-Source: AGHT+IE88z6ZKihZy73X/hJ1tvJ33+pu9VU9RoQmgEehZIq7TTfq3+V7yphWkv94NZdwTEK7BUmRnw== X-Received: by 2002:a1c:4b10:0:b0:40e:d2fa:fbdd with SMTP id y16-20020a1c4b10000000b0040ed2fafbddmr75392wma.172.1706289362605; Fri, 26 Jan 2024 09:16:02 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id k10-20020a05600c1c8a00b0040e451fd602sm6287286wms.33.2024.01.26.09.16.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:16:01 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, jassi.brar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 11/17] spi: s3c64xx: rename prepare_dma() to s3c64xx_prepare_dma() Date: Fri, 26 Jan 2024 17:15:39 +0000 Message-ID: <20240126171546.1233172-12-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240126171546.1233172-1-tudor.ambarus@linaro.org> References: <20240126171546.1233172-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240126_091603_995808_86AB3C5E X-CRM114-Status: GOOD ( 11.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Don't monopolize the name. Prepend the driver prefix to the function name. Reviewed-by: Sam Protsenko Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 64daf944b245..76fa378ab5ab 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -278,8 +278,8 @@ static void s3c64xx_spi_dmacb(void *data) spin_unlock_irqrestore(&sdd->lock, flags); } -static int prepare_dma(struct s3c64xx_spi_dma_data *dma, - struct sg_table *sgt) +static int s3c64xx_prepare_dma(struct s3c64xx_spi_dma_data *dma, + struct sg_table *sgt) { struct s3c64xx_spi_driver_data *sdd; struct dma_slave_config config; @@ -444,7 +444,7 @@ static int s3c64xx_enable_datapath(struct s3c64xx_spi_driver_data *sdd, chcfg |= S3C64XX_SPI_CH_TXCH_ON; if (dma_mode) { modecfg |= S3C64XX_SPI_MODE_TXDMA_ON; - ret = prepare_dma(&sdd->tx_dma, &xfer->tx_sg); + ret = s3c64xx_prepare_dma(&sdd->tx_dma, &xfer->tx_sg); } else { switch (sdd->cur_bpw) { case 32: @@ -476,7 +476,7 @@ static int s3c64xx_enable_datapath(struct s3c64xx_spi_driver_data *sdd, writel(((xfer->len * 8 / sdd->cur_bpw) & 0xffff) | S3C64XX_SPI_PACKET_CNT_EN, regs + S3C64XX_SPI_PACKET_CNT); - ret = prepare_dma(&sdd->rx_dma, &xfer->rx_sg); + ret = s3c64xx_prepare_dma(&sdd->rx_dma, &xfer->rx_sg); } } From patchwork Fri Jan 26 17:15:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13532912 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 38E75C47DDB for ; Fri, 26 Jan 2024 17:17:47 +0000 (UTC) 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=HSL5LVDpSLyXsLqCXUItZd2DLs+6EJ9xsvaoJCj1GlU=; b=eLUteLV6EgViPU zmov+57nYAMQIdUAhjEVNbQAYNztabJSkNWoE0pN4q1tFBSkg7zF71WVyq0jqA1m7dmIcwFmtN3N2 nlyavODOf+iekKt5kTvlyclCx7//LnxC6L2AFF0l3WWG1RqunDPyJ5pf6M84Rc4IYoipj85fnYP6x NWZNmDDIr75/kVv06cqQuIeGTVUmj4GzggGRxigduGa89Gp2KoUHh1KyLMmg+Ah71oNFrw5EtOo7l 8cTiIgBgMFMJ2dotfwf/0tSYKStw/7GdgHKievmY4idjNoo9cIJjvuNr6pJlkWLbcsAEJig4oYU9y F2iT4nyHDbpmy+zeUH2Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPpg-00000004qTy-0eR0; Fri, 26 Jan 2024 17:17:36 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPoG-00000004pWR-1D8A for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 17:16:12 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-50f11e3ba3aso1074660e87.1 for ; Fri, 26 Jan 2024 09:16:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289363; x=1706894163; 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=ndYor9VIkq6f4pBg/Nd55Aw4wNpXBPkalwBZbSLcCVs=; b=vBEL3xUw1wrSiKS82pYThRUDHuBR+PPfIJAPxQK2pF7r+IsyK16XGs1PwJMyAe7SHW wrPo59x9DzA9OjN7fAEYerHtA8LhKNJB+mjjoC4iBUr7xEnyrJVbymmWUIQ0BBPKoAXM T/ikwf39kLYwXWecoz3RKsrWr2XmafzHMkiq6xyMrhO4Tx4UrE+dCDQ0vzDwrRncbiQU WZhMlsvXyQE6ETpy2mtjJO/4tR+w7J7ZQ+KRKhFa179UB1lCuKhEgv9zPGsi3M9DBfGL zT0eq3sDmuq9XGDRyNB+yDbuFE9sMzwWwnU4vQj6MwzEHN1pb9Tewb9qa0F94vdcArvR 755A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289363; x=1706894163; 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=ndYor9VIkq6f4pBg/Nd55Aw4wNpXBPkalwBZbSLcCVs=; b=FQlspB2YUY5pIQhm51UyJXltUlxd1FIfjE0zdsRduWx+foi4TrMRo0fsNljIiJLDWy oyHPwnq/Io3Nx5OQsyzIBR2rGUl5nmd0E/oMlA5La4k+JMq+D4D+LYdfJA50DGeRbhBJ j+JCP0BXUJXnbICin+QwM6OurVVE7ix4nH+HuPpqtOycqGEs4Dvu7maaU/DI7CI82Tjy Sxe7jlo1GPjac3dQy/uBqBH63ixHEy/JD0sDvrEfSPX/6TP0MGJ482OgzlB7URlw8SCG joDDRd9JzsfmoYqluphDio/ilhMX4taF1L+tD6b6D51Zk41trywL412Ntc002WjxcHs8 c3mw== X-Gm-Message-State: AOJu0YwFFidjY3E58oIp6G/AeD9hkjYQTH3pobnF/7MW/7Qq4wLxTeDd rsigcVKKJDV83k9ePbwkO3P7F3XEjgHKAmUIuIVJ+3hHGE2tZzzFuflylnJxdfA= X-Google-Smtp-Source: AGHT+IFEtRaaitooDido15ekLBkacrVyqkBTdRgKQbRruG3+KRsCCYWnu1LvbW+f3Xs1EHiodmYnYw== X-Received: by 2002:ac2:5a11:0:b0:510:272c:d011 with SMTP id q17-20020ac25a11000000b00510272cd011mr187130lfn.69.1706289363696; Fri, 26 Jan 2024 09:16:03 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id k10-20020a05600c1c8a00b0040e451fd602sm6287286wms.33.2024.01.26.09.16.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:16:02 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, jassi.brar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 12/17] spi: s3c64xx: return ETIMEDOUT for wait_for_completion_timeout() Date: Fri, 26 Jan 2024 17:15:40 +0000 Message-ID: <20240126171546.1233172-13-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240126171546.1233172-1-tudor.ambarus@linaro.org> References: <20240126171546.1233172-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240126_091608_881206_492E84EA X-CRM114-Status: GOOD ( 11.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org ETIMEDOUT is more specific than EIO, use it for wait_for_completion_timeout(). Signed-off-by: Tudor Ambarus Reviewed-by: Sam Protsenko --- drivers/spi/spi-s3c64xx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 76fa378ab5ab..2f2c4ad35df4 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -526,7 +526,7 @@ static int s3c64xx_wait_for_dma(struct s3c64xx_spi_driver_data *sdd, /* * If the previous xfer was completed within timeout, then - * proceed further else return -EIO. + * proceed further else return -ETIMEDOUT. * DmaTx returns after simply writing data in the FIFO, * w/o waiting for real transmission on the bus to finish. * DmaRx returns only after Dma read data from FIFO which @@ -547,7 +547,7 @@ static int s3c64xx_wait_for_dma(struct s3c64xx_spi_driver_data *sdd, /* If timed out while checking rx/tx status return error */ if (!val) - return -EIO; + return -ETIMEDOUT; return 0; } @@ -577,7 +577,7 @@ static int s3c64xx_wait_for_pio(struct s3c64xx_spi_driver_data *sdd, if (use_irq) { val = msecs_to_jiffies(ms); if (!wait_for_completion_timeout(&sdd->xfer_completion, val)) - return -EIO; + return -ETIMEDOUT; } val = msecs_to_loops(ms); From patchwork Fri Jan 26 17:15:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13532910 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5222EC47DDF for ; Fri, 26 Jan 2024 17:17:44 +0000 (UTC) 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=MAMdO88B0v51R+5RdYxFGpzyMn3yioACp04P9AZdyHs=; b=xWkLg68BzngdAF /XaE8zEMXa+y48mEwspP7entFqDttroENHPMw++0P1/hPxvf6D0dpNsOqv/kB0OABxDgY9LyhRKJE A+wnLLYqmkJUofq7zq9dZjSBy12vwUbVwBmuYB4r9PrCt9cYRVu831R/MsXrJYGlf1lBayuyMpOSq WP6IaIz8ovDn0Y/qFs/Tc1Cds707d7VXLvMNsXqNNI5OHN8+m5nPUEFmsk4F5OxqQ+0HEaxexlrHW mBbQ+wqNqAOsYw65MzSK+siho8hPmUwEdrfu95wgzYnt7xC/9J7veBeJnz4DV/QcYIvkJH99hgh2l TU7AhYe7eV6PTZ6P+MFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPpc-00000004qRl-42YW; Fri, 26 Jan 2024 17:17:32 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPoE-00000004pX2-0cn6 for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 17:16:08 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-40e60e137aaso14176995e9.0 for ; Fri, 26 Jan 2024 09:16:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289365; x=1706894165; 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=tGTNJGu0ukXFyt9xeb5mPdj6cnncaL6QD7HHX08zdSQ=; b=Q1yMBIYWIUKCBtoheFK3DWPm7YOJd1e7z4k/1ef5erCDYFjjio8idf5dIhU4c2gF1E t/aiVT5zPLMkAm2ut2MNs3DDq+CSn5peQ1LlQUru/A71grdHvS1I1HFGuhbmW2SwWlHm CzWF7NWBkqjqGDZTIc9ru5Sww5m+GVCXuVWaBeWVQog56nz1+3BQcqZSwz6ZF0L5gAwz yv2/6GwvZXWMa/TEKUNtCN1G4wrzXeNrwG5gKRX1hO4lTejP0ngXhdLvBIHCO7locJkl 6UTkMiV5Au21b7DZcEwsq4y5vtRRRyFenRDt8ogb7EIieP/uypaWqrllSFnBnH/OWrEQ P45w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289365; x=1706894165; 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=tGTNJGu0ukXFyt9xeb5mPdj6cnncaL6QD7HHX08zdSQ=; b=RN28gKNWiH+OshWVEiC/svU+KbhZ0Fxo474A5jDeti/kq38WZB4HdIFrU+6EFfYtWj HVgUF3w70xNRZzaZsiheIibgF5QZRYuJeT1c38+5h1pUG8uETNPkSLiDxmq0AoOE5g4N w3an01tsyvT+hBqiRAzHW2Vh3aMR7J9A7oe879X5adCGZvO+YIWSh5sjK2te5yEnmGUA Vq/dFUHj/1AvQWSSBcaimXPT9ReY4QGWUJpM1slkWneSH359/9q1Mm14qB9Vcr2+zoKv knmE6qWxolR5YWKclhIaiybvEL6qq+NcR3+JLoFCSp0C37tAjfwSIeDfFUXDVmmFY1YE KqZQ== X-Gm-Message-State: AOJu0Ywbx4onFO4TV+c2ijAbdM+UpZVIcr+Ev7SSyRpJuBTl2xb1hS3A zEzGeXUCkuz+I1r490c7abbLmEJr17au3C24Q3TY3bLAxdopPNSChySWgkTm6To= X-Google-Smtp-Source: AGHT+IFm06n9bv4+cWRnJ/uDg+/bPG8VRaqfbnFy+FN0Vjs4qRwIYkxG124p37ZXa85vCR++v+/zDA== X-Received: by 2002:a05:600c:22d5:b0:40e:863e:2f16 with SMTP id 21-20020a05600c22d500b0040e863e2f16mr76277wmg.128.1706289364833; Fri, 26 Jan 2024 09:16:04 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id k10-20020a05600c1c8a00b0040e451fd602sm6287286wms.33.2024.01.26.09.16.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:16:04 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, jassi.brar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 13/17] spi: s3c64xx: drop blank line between declarations Date: Fri, 26 Jan 2024 17:15:41 +0000 Message-ID: <20240126171546.1233172-14-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240126171546.1233172-1-tudor.ambarus@linaro.org> References: <20240126171546.1233172-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240126_091606_295079_05B7B563 X-CRM114-Status: GOOD ( 11.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Drop the blank line and move the logical operation in the body of the function rather than in initialization list. Reviewed-by: Sam Protsenko Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 2f2c4ad35df4..08ba14adb428 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -1320,8 +1320,9 @@ static int s3c64xx_spi_suspend(struct device *dev) { struct spi_controller *host = dev_get_drvdata(dev); struct s3c64xx_spi_driver_data *sdd = spi_controller_get_devdata(host); + int ret; - int ret = spi_controller_suspend(host); + ret = spi_controller_suspend(host); if (ret) return ret; From patchwork Fri Jan 26 17:15:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13532913 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8DBA6C47DDB for ; Fri, 26 Jan 2024 17:17:49 +0000 (UTC) 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=0D6LPQy/qZmMOpGGPucPJR0IW/3oEweIfmW//V8P6u8=; b=KSuSG0weXWbro8 qdMZoeLZHwkA8n+/I22DeZLuTt5amrMic3Xaxd+D0Et0g27Ry5RXZ1O+egR5NwRGc2TaMffFiNVuR KZKREIOFPhR05L8aTub77Lnw3iEpva3v5zc0eNJCwFM7U5RTuSXp1LaUShszpAUU3fExPoXPl7s6B UoLZoAxTjG0mTT1urk9LtKzDc2JeCFnvyk9xx0d0aPAl3xbogzH0opB3N/4EthPrkhtXWB9k/3RBq mPkOfKq1J4nElHdcy6qpLLUARoaxuvwPz13QTmazg9QeT3E9ruFjfV3dBntHboBDWuzY5kLh2LasO OHvDOaTbq1wPC2XCjpYQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPpd-00000004qSS-3kWI; Fri, 26 Jan 2024 17:17:34 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPoF-00000004pZ8-3ZQO for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 17:16:12 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-40e60e137aaso14177405e9.0 for ; Fri, 26 Jan 2024 09:16:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289366; x=1706894166; 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=m3BUKyeiRYW4jeA7TZoHpkhbR6vvjhTD7HPIsfioyFU=; b=sBXSYBUhoilZv5VuMn763ajI1KPVsISIPboVVwTvOGIK16K9p/SM8OVAu4eyDffi5y /T89uGk8jbwxmuL8XaqYnm6Vt6ol7d97Y+AMZBuh50MSl+qgbAVgShyP4LrGg+41hXW2 LY4FYR9GBO4p31uMlJESp5lZY04oBPnabEqdpkWqoVXuS+AhulPyG0davO68259t0GLl KygJEQx3xOJzWd211z4mN6hHmDAuaN0n+y9C5PInS7+RSsxm4ytl8aqCaMZlGsoYkgMC X9xOn9svG1nWkBaxOo6tgZZpAY5IM7APF0ma302moyjlvtelJ/EKAbh0q0MkUX0ubTrb libw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289366; x=1706894166; 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=m3BUKyeiRYW4jeA7TZoHpkhbR6vvjhTD7HPIsfioyFU=; b=buFH20HMKk/Yv4ru+JDLLpxePSa6DwB33TrIiVUUApBx4QSVwc43oG0c0MJuFC9Kk9 x+V3xL8T68T7tdjOKHVmXQBZwXDQuy8GZrO1ihEUVFK+Up6oO1GhCc5l3sUiZcwTzGCp c4kFnSQXjNzQ7jeWO9uF4Qj+zFcjRJi1c/aG1QbkdP7DOAA1LBH1+A+6aOb7Fi21FM4u Q/+JJlP367oxLAlhWc+6bcnEBSB5Se/ihT+smzbS4K8sDhoFunvlf69mF8hfIKhBNC3e v6wA6+eQSn//BhxHElCuIiHVqcVOO7d0+erqYqheUBR3F16Teb9qExXSWDNy4d5Wu0q9 FFOw== X-Gm-Message-State: AOJu0Yx2s3ZVAjMsf9aKqvSqbkwUOyE1gS7pP95zCJVaC99vm9Q6RHh8 hzGih6orxjM9iYqJnCaj94+RQKOx78rM08fsGn72gMuEw/xalKfUtFrgPKT2HvQ= X-Google-Smtp-Source: AGHT+IGXA5OdbN/hZ+PSA1B3tx0eYhNTDcxU0ip6939VswQMQ+86fcDQfDoKgCsYLdXwu540N2Mj+Q== X-Received: by 2002:a05:600c:5698:b0:40e:44af:8b1e with SMTP id jt24-20020a05600c569800b0040e44af8b1emr66917wmb.160.1706289366387; Fri, 26 Jan 2024 09:16:06 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id k10-20020a05600c1c8a00b0040e451fd602sm6287286wms.33.2024.01.26.09.16.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:16:05 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, jassi.brar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 14/17] spi: s3c64xx: downgrade dev_warn to dev_dbg for optional dt props Date: Fri, 26 Jan 2024 17:15:42 +0000 Message-ID: <20240126171546.1233172-15-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240126171546.1233172-1-tudor.ambarus@linaro.org> References: <20240126171546.1233172-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240126_091608_512675_069D289B X-CRM114-Status: GOOD ( 11.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org "samsung,spi-src-clk" and "num-cs" are optional dt properties. Downgrade the message from warning to debug message. Reviewed-by: Sam Protsenko Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 08ba14adb428..dc779d5305a5 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -1109,14 +1109,14 @@ static struct s3c64xx_spi_info *s3c64xx_spi_parse_dt(struct device *dev) return ERR_PTR(-ENOMEM); if (of_property_read_u32(dev->of_node, "samsung,spi-src-clk", &temp)) { - dev_warn(dev, "spi bus clock parent not specified, using clock at index 0 as parent\n"); + dev_dbg(dev, "spi bus clock parent not specified, using clock at index 0 as parent\n"); sci->src_clk_nr = 0; } else { sci->src_clk_nr = temp; } if (of_property_read_u32(dev->of_node, "num-cs", &temp)) { - dev_warn(dev, "number of chip select lines not specified, assuming 1 chip select line\n"); + dev_dbg(dev, "number of chip select lines not specified, assuming 1 chip select line\n"); sci->num_cs = 1; } else { sci->num_cs = temp; From patchwork Fri Jan 26 17:15:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13532914 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3C247C47DDF for ; Fri, 26 Jan 2024 17:17:50 +0000 (UTC) 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=2WuzJ33RV2FBsb580s25+Jrx1Ui8A2+zWNO/cmuhh/Q=; b=lkunfD1jzBAT4q nCORzIS9Dhv0eL1e8LOLH6gDX+u47wDimn2uZ4cli9D7EpUc9CMEk5WrZJ+tFB/ZNMrhGZeHyNzbH rAS2Y4NM3bvakUMaYc8Dx0QmdpOUqYlJmrKx9dn+mFHQu95Z4vZPerXQGYPGVpYJ3a3lxqLb8k0ue G5gslV8+zMkpz/nguvq6LjG2Puu4cyaKwTe7wmAKRLMpd+wiFdcor/NYS8ZnwFXIR5PnYtXF4keml 5uApxdex8xIFwZXmvdRDsR6ujGn4mkRzsJPQh+7jPnXgpOSXWKlFVrAKDlIRcUKEkQ+Nyxr6OnOhT s0vO1TQuzEN+yOFJoPMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPpj-00000004qX1-42Gq; Fri, 26 Jan 2024 17:17:39 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPoL-00000004pZZ-2OKA for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 17:16:16 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40e7065b692so9309385e9.3 for ; Fri, 26 Jan 2024 09:16:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289367; x=1706894167; 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=DVq9gzGN+1aHFWyNtJAgoaKp9sfSAHeIW/0R0QyQQkg=; b=nSbO2D2HULAI9nZBPmGqsWpB2YgKJTt/AtpMEnvu8kWz8T8AuQ1UC16lG3kqGKov9p ssQs/3j0X36Ehkfy5HuxGMN8UIKSPF47N5DQwrZmOnGigfVigX4/Kmr9Li4zN9W3y0qK 95iDsu2k/m52BXNgqFCNAPu3WRiGz/e0u1Ue5woULZG7lHhBFl4ShXU0yM+S5hQf3ad9 vE527pvMGGNz7p+w80plGbQTRVyVtywb76C0kOIqQ148R1ely7GhvZIg46JzlClWCPjI RB1JY9l+IzNAX32GBgmyuILoAplHwFEWgDz+gmuUEZvnqUi42rgGKxhcI832S8p6m6XJ EPWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289367; x=1706894167; 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=DVq9gzGN+1aHFWyNtJAgoaKp9sfSAHeIW/0R0QyQQkg=; b=LxEBRw+D/deF2b5qlfuj6HTccYJuYEck4bmesT6hTsv+tdq4SyQq1rF+3wLAEIDmZE Mz54DYn5vl1HEVGJaQ0d4XE32ajhK57zUk7C/Zw6xYVC3nB3i8/2a3q+pGedecBkrsfh 3dUVdfxEnm+Qkj9uA0X1J9FbtPAe7satLMW5K4iW0y/m605a+IDzr49o/IFzvPbeEVYN T+W2IE5ZpQNHXOe88SUzg/imCugHEDgK3u1CULJJnH2MZJ80S1jEBQfW8RnYeMCpjcjf P4+csFKajq6MzKcNK6w9QgXj6fy2R6WTaFJimwPNStzKkOCCnxtbot7Kjil6DPFgrYqG +L/g== X-Gm-Message-State: AOJu0Yw3WaUITlZIU8IOdPWnZw0V2IQ3C565Lfv9zjhxxLWFnRnqVTwE bG6j/KOEHvjqJuNU5GPVjqrR8aN7VFxRB8QEuITEiy8KIfEY+WzaPC0gRXNepX4= X-Google-Smtp-Source: AGHT+IFVRdh+nTto07hFuQ0RqYhrZMrRuBlmG3jqU+FgxzdxqJtLZQQ0bXMJzggiSnO7a4H5ktlVvA== X-Received: by 2002:a05:600c:2146:b0:40e:e241:9347 with SMTP id v6-20020a05600c214600b0040ee2419347mr87421wml.85.1706289367150; Fri, 26 Jan 2024 09:16:07 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id k10-20020a05600c1c8a00b0040e451fd602sm6287286wms.33.2024.01.26.09.16.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:16:06 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, jassi.brar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 15/17] spi: s3c64xx: remove duplicated definition Date: Fri, 26 Jan 2024 17:15:43 +0000 Message-ID: <20240126171546.1233172-16-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240126171546.1233172-1-tudor.ambarus@linaro.org> References: <20240126171546.1233172-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240126_091613_873474_2C54421F X-CRM114-Status: UNSURE ( 8.94 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org S3C64XX_SPI_TRAILCNT brings no benefit in terms of name over S3C64XX_SPI_MAX_TRAILCNT. Remove the duplicated definition. Signed-off-by: Tudor Ambarus Reviewed-by: Sam Protsenko --- drivers/spi/spi-s3c64xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index dc779d5305a5..e9344fe71e56 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -115,8 +115,6 @@ #define S3C64XX_SPI_MAX_TRAILCNT 0x3ff #define S3C64XX_SPI_TRAILCNT_OFF 19 -#define S3C64XX_SPI_TRAILCNT S3C64XX_SPI_MAX_TRAILCNT - #define S3C64XX_SPI_POLLING_SIZE 32 #define msecs_to_loops(t) (loops_per_jiffy / 1000 * HZ * t) @@ -1092,7 +1090,7 @@ static void s3c64xx_spi_hwinit(struct s3c64xx_spi_driver_data *sdd) val = readl(regs + S3C64XX_SPI_MODE_CFG); val &= ~S3C64XX_SPI_MODE_4BURST; val &= ~(S3C64XX_SPI_MAX_TRAILCNT << S3C64XX_SPI_TRAILCNT_OFF); - val |= (S3C64XX_SPI_TRAILCNT << S3C64XX_SPI_TRAILCNT_OFF); + val |= (S3C64XX_SPI_MAX_TRAILCNT << S3C64XX_SPI_TRAILCNT_OFF); writel(val, regs + S3C64XX_SPI_MODE_CFG); s3c64xx_flush_fifo(sdd); From patchwork Fri Jan 26 17:15:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13532915 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7C0FEC47422 for ; Fri, 26 Jan 2024 17:17:50 +0000 (UTC) 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=BCRICHT4QCa8q55RUztyKGI48Sq+354XTBnAbYn6zBE=; b=S4LtIX/rNR9cXW yct9dvFZrTo7Lf61kubgzHagw0r1TBP+PR7jyMCiuc+Kcp5UMfrya/rTelROxBCm8BneSGld0DvnN JS0C5ohIlA4bx86z5T+Y33XmgT8DUE4pCFZmOUAtHqElSxLXpm9AtwzpG4av8/FlPMEWeAHhaw1i6 oCUAmlF+T1TLbGrbysVr7lgJfKt2VRoPpCuI5Pr14LTt7PlJqWUARS6HJ7urnBhNE6sP7GCPsuZwR GbFsevhCnIIQr633uJFsa6J0njMA1Lil32PsrstzqizO0VpcC4n40pNJ7IfL5noPTN7Wi23iufBFQ utLzcKzE48FI9hY47snw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPpi-00000004qVH-0U9B; Fri, 26 Jan 2024 17:17:38 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPoH-00000004pbE-3OkS for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 17:16:12 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40ee705e9e3so7018715e9.1 for ; Fri, 26 Jan 2024 09:16:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289368; x=1706894168; 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=EWAxzMIZUJGbfnyG/OlNotr0pMDtQfjiFLXbcGRYeAQ=; b=xSrM9LrcE3k4LzM7mPiBEsN4mKSuYWnILnjY+wi/CL+HAXOdI5dfUp9Y0mvOOWRNKF 2LOglXWTUqF1G7DdBEOOJRHAHCz2PntLUlzETpANEmoqkY5D5mI6w64GsQa3cfMjlsF9 n+GDXC7L/EKMMxZ4pn+dTb0oabAOSzsEBwxnMilI29BeNDT3nLJ/cxUWEWm2HVIDyyBH 3s3/3Nz6wnLTmEV8A1z1yDzEsYRDZdtyfa/OGA1eff0xI1OHkAJL22kXQJGgNDFEj+xZ B1fMwkggh/QT6mr9NoAK9+ocHyBcBwnzK5JHo1fhesTh07uSSMZLj2dVZ0VOF9NPpzXq +88Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289368; x=1706894168; 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=EWAxzMIZUJGbfnyG/OlNotr0pMDtQfjiFLXbcGRYeAQ=; b=AeYo3UJ/Eln2dLiS/JRLBVUJmD+NLMRBkJhnBKkzRlzlBg4GXYZKr/ejMSMc5lNGfa SijwNRJfK5KbbTTtF8nsVIANOiax3KA9jNwd79xm4iEkhuz9hLXj4hRfBIu6BVl2E7Yy AgvDxZ3IYdeIqjH93kNcVNC2tBYR7g0md8nak0tS+kdvCpdSvEFjj42sia2tGOoN1+6W VBB9LiKPVYvTUwMYqGOzNYaoSmMuNjzwXvmN5dq0FCrsD1lyhc5AUHz52/QS3g2z27jB +EoB6iTY5tfDCX3zGViKlnAgw+DjfK7X5xCi/EuVVgk3ML3L/Ph3CB+9gxI+GCjDBDMa AR1w== X-Gm-Message-State: AOJu0YzL6Np4LA7nTA8ZNrCVINAvou9DlkMFgV7ILQEk1zMY7JZrsiH0 39j+6uRAZHA5RYRyOPPln5xmAYI1HmgxbKISEwx6uMfOyH/YQyzmWgSGzm9j/7s= X-Google-Smtp-Source: AGHT+IGsOiEDkiB2xffnZw17FMX/xnuVHZhIvhWnxlSn6346ayQ0rGAqxJqIWl1P8tDQMLFabx03FA== X-Received: by 2002:a05:600c:ad0:b0:40d:5f48:d1ed with SMTP id c16-20020a05600c0ad000b0040d5f48d1edmr89438wmr.66.1706289368230; Fri, 26 Jan 2024 09:16:08 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id k10-20020a05600c1c8a00b0040e451fd602sm6287286wms.33.2024.01.26.09.16.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:16:07 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, jassi.brar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 16/17] spi: s3c64xx: drop a superfluous bitwise NOT operation Date: Fri, 26 Jan 2024 17:15:44 +0000 Message-ID: <20240126171546.1233172-17-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240126171546.1233172-1-tudor.ambarus@linaro.org> References: <20240126171546.1233172-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240126_091610_188747_CBF93D54 X-CRM114-Status: UNSURE ( 8.87 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org val &= ~mask; val |= mask; is equivalent to: val |= mask; Drop the superfluous bitwise NOT operation. Signed-off-by: Tudor Ambarus Reviewed-by: Sam Protsenko --- drivers/spi/spi-s3c64xx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index e9344fe71e56..43b888c8812e 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -1089,7 +1089,6 @@ static void s3c64xx_spi_hwinit(struct s3c64xx_spi_driver_data *sdd) val = readl(regs + S3C64XX_SPI_MODE_CFG); val &= ~S3C64XX_SPI_MODE_4BURST; - val &= ~(S3C64XX_SPI_MAX_TRAILCNT << S3C64XX_SPI_TRAILCNT_OFF); val |= (S3C64XX_SPI_MAX_TRAILCNT << S3C64XX_SPI_TRAILCNT_OFF); writel(val, regs + S3C64XX_SPI_MODE_CFG); From patchwork Fri Jan 26 17:15:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13532916 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EC599C47422 for ; Fri, 26 Jan 2024 17:17:57 +0000 (UTC) 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=0gsEcqTaH8Y93r/oirMhVbSd4xdQwZdy7GYrshh5lgw=; b=QaL6FsuUr9ePMJ B3QNQeW52mJaBbpZ2TTgK8X5iZavulsbUMERWyItr6T6DYyl96sNLM0Fek3TYLxJyCp8BJ3jh6YFZ SscYKrNWreeyteDv7XtUfCXy3KNosRu/XNxFGWzvdpMryuMa34Xz6STnNQ6AM2TwvCOQGWCSdLlD/ 2TNfkoA6TBAE8DugSpqSlPqr8XcW+uNppGWbiTU9fNFstxx7FXkcT5erYLnHibtvzQGGnBw7bDvBG varzkzB33qm5vJFFEXANYRHeDlQhfoUxrsuKezlqIDeIPQjVTWKOXZlchL2D7I2xx+aDrGuUpYln9 /EIlOEmtcpBfhLKO6q4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPpm-00000004qZR-2EFw; Fri, 26 Jan 2024 17:17:42 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPoL-00000004pcC-2HUy for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 17:16:21 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-40e5afc18f5so9674675e9.3 for ; Fri, 26 Jan 2024 09:16:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289369; x=1706894169; 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=J4eHVujQrbVd61QBJFM5PhcAZf81EZ3ospR7GnzZm9Y=; b=zcmKPbb0yNotY/NGSzVDVlhsKGzN5QB4qa2J3gygboPjzq25DoN9mmTxerXS6d4Ctf 4Ur9DsLtOlyifvswTC0Wd9KtvteSlQQGLTc8JPZ1a1r5g9oMEKEMO3X43stuanhHN5aI Xk0E1SuHn46BIOAJMW9h+btxM6Sgl2iZvkIyA13E9lgmeMaf4bWFqU875WPYH8hXzRJo xZOwCXrQnNGQrB+S9bZ5fOPAclNPzeseiugVrybG67gUB4KGDPWhyTGYwNbCrOEnDh/K Kiw/ix/Ktw2inU5AqwKOm6twayBgKvDE23unXI6IMQ0RF694NnjfbdpiGjGUWsBL6YPi TGGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289369; x=1706894169; 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=J4eHVujQrbVd61QBJFM5PhcAZf81EZ3ospR7GnzZm9Y=; b=NCRHVLylRwxY3FYBqs2q2rEREGSfn8O6RR+EoGxLkGBVTMqqpzaFIrD8Y/9OPDjRtM /iGb93/Y892UDXMmrzpgbGuH24CMUO54ZVYLANbKwOFrV7QF5U4GBmYNVRpXwkJK75Pp PoJsOXOIcWxvsYgRpRv4IDx3E7aSq4f6wSTxH+aNQcTuSRXG4tZU598F/1FZe/yRIwAm nuSQIQMtziWiPTqppfYFv05BKkAhJ78ShMC9KoBcIygWtrkwrIwA8cKZCrKfQU9WNOiq KhduacOO5YxlnKBQHHLGfEXEuZ4wYKhh3fbBX/YAAeQ4NyfryvbAHdGBoxYlb39KBZSJ F7HA== X-Gm-Message-State: AOJu0YzUiPKzmGHvgKzEwxw1Z2Z7oyzEewz1504afWAuXb/slP0vHGRn ecOKsTT94WuDXKYgWNjjZ6sQETAHuxPRtl8wb/6Vl31hIxRPLZUpMRNth4T0omq7qWSWMxqR3VH VSQU= X-Google-Smtp-Source: AGHT+IGgmi+uKf/WzzdNGcx4Ui9dyO/h8yxsArsC5YJk2EuQYEgheINIrJVpVI8edVXHS/kCEj6IxQ== X-Received: by 2002:a05:600c:190b:b0:40e:3b1c:d3a2 with SMTP id j11-20020a05600c190b00b0040e3b1cd3a2mr80118wmq.126.1706289369258; Fri, 26 Jan 2024 09:16:09 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id k10-20020a05600c1c8a00b0040e451fd602sm6287286wms.33.2024.01.26.09.16.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:16:08 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, jassi.brar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 17/17] spi: s3c64xx: use bitfield access macros Date: Fri, 26 Jan 2024 17:15:45 +0000 Message-ID: <20240126171546.1233172-18-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240126171546.1233172-1-tudor.ambarus@linaro.org> References: <20240126171546.1233172-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240126_091613_799821_D6367E7D X-CRM114-Status: GOOD ( 15.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use the bitfield access macros in order to clean and to make the driver easier to read. Introduce S3C64XX_SPI_MAX_TRAILCNT_MASK to replace value and offset equivalents (S3C64XX_SPI_MAX_TRAILCNT, S3C64XX_SPI_TRAILCNT_OFF). While touching the register definitions, align their values to the same offset. No functional change intended, the bit operations shall be equivalent. Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 193 ++++++++++++++++++++------------------ 1 file changed, 101 insertions(+), 92 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 43b888c8812e..7f052d6cd2ba 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -4,6 +4,7 @@ // Jaswinder Singh #include +#include #include #include #include @@ -18,91 +19,96 @@ #include #include -#define MAX_SPI_PORTS 12 -#define S3C64XX_SPI_QUIRK_CS_AUTO (1 << 1) -#define AUTOSUSPEND_TIMEOUT 2000 +#define MAX_SPI_PORTS 12 +#define S3C64XX_SPI_QUIRK_CS_AUTO BIT(1) +#define AUTOSUSPEND_TIMEOUT 2000 /* Registers and bit-fields */ -#define S3C64XX_SPI_CH_CFG 0x00 -#define S3C64XX_SPI_CLK_CFG 0x04 -#define S3C64XX_SPI_MODE_CFG 0x08 -#define S3C64XX_SPI_CS_REG 0x0C -#define S3C64XX_SPI_INT_EN 0x10 -#define S3C64XX_SPI_STATUS 0x14 -#define S3C64XX_SPI_TX_DATA 0x18 -#define S3C64XX_SPI_RX_DATA 0x1C -#define S3C64XX_SPI_PACKET_CNT 0x20 -#define S3C64XX_SPI_PENDING_CLR 0x24 -#define S3C64XX_SPI_SWAP_CFG 0x28 -#define S3C64XX_SPI_FB_CLK 0x2C - -#define S3C64XX_SPI_CH_HS_EN (1<<6) /* High Speed Enable */ -#define S3C64XX_SPI_CH_SW_RST (1<<5) -#define S3C64XX_SPI_CH_SLAVE (1<<4) -#define S3C64XX_SPI_CPOL_L (1<<3) -#define S3C64XX_SPI_CPHA_B (1<<2) -#define S3C64XX_SPI_CH_RXCH_ON (1<<1) -#define S3C64XX_SPI_CH_TXCH_ON (1<<0) - -#define S3C64XX_SPI_CLKSEL_SRCMSK (3<<9) -#define S3C64XX_SPI_CLKSEL_SRCSHFT 9 -#define S3C64XX_SPI_ENCLK_ENABLE (1<<8) -#define S3C64XX_SPI_PSR_MASK 0xff - -#define S3C64XX_SPI_MODE_CH_TSZ_BYTE (0<<29) -#define S3C64XX_SPI_MODE_CH_TSZ_HALFWORD (1<<29) -#define S3C64XX_SPI_MODE_CH_TSZ_WORD (2<<29) -#define S3C64XX_SPI_MODE_CH_TSZ_MASK (3<<29) -#define S3C64XX_SPI_MODE_BUS_TSZ_BYTE (0<<17) -#define S3C64XX_SPI_MODE_BUS_TSZ_HALFWORD (1<<17) -#define S3C64XX_SPI_MODE_BUS_TSZ_WORD (2<<17) -#define S3C64XX_SPI_MODE_BUS_TSZ_MASK (3<<17) +#define S3C64XX_SPI_CH_CFG 0x00 +#define S3C64XX_SPI_CLK_CFG 0x04 +#define S3C64XX_SPI_MODE_CFG 0x08 +#define S3C64XX_SPI_CS_REG 0x0C +#define S3C64XX_SPI_INT_EN 0x10 +#define S3C64XX_SPI_STATUS 0x14 +#define S3C64XX_SPI_TX_DATA 0x18 +#define S3C64XX_SPI_RX_DATA 0x1C +#define S3C64XX_SPI_PACKET_CNT 0x20 +#define S3C64XX_SPI_PENDING_CLR 0x24 +#define S3C64XX_SPI_SWAP_CFG 0x28 +#define S3C64XX_SPI_FB_CLK 0x2C + +#define S3C64XX_SPI_CH_HS_EN BIT(6) /* High Speed Enable */ +#define S3C64XX_SPI_CH_SW_RST BIT(5) +#define S3C64XX_SPI_CH_SLAVE BIT(4) +#define S3C64XX_SPI_CPOL_L BIT(3) +#define S3C64XX_SPI_CPHA_B BIT(2) +#define S3C64XX_SPI_CH_RXCH_ON BIT(1) +#define S3C64XX_SPI_CH_TXCH_ON BIT(0) + +#define S3C64XX_SPI_CLKSEL_SRCMSK GENMASK(10, 9) +#define S3C64XX_SPI_ENCLK_ENABLE BIT(8) +#define S3C64XX_SPI_PSR_MASK GENMASK(7, 0) + +#define S3C64XX_SPI_MODE_CH_TSZ_MASK GENMASK(30, 29) +#define S3C64XX_SPI_MODE_CH_TSZ_BYTE 0 +#define S3C64XX_SPI_MODE_CH_TSZ_HALFWORD 1 +#define S3C64XX_SPI_MODE_CH_TSZ_WORD 2 +#define S3C64XX_SPI_MAX_TRAILCNT_MASK GENMASK(28, 19) +#define S3C64XX_SPI_MODE_BUS_TSZ_MASK GENMASK(18, 17) +#define S3C64XX_SPI_MODE_BUS_TSZ_BYTE 0 +#define S3C64XX_SPI_MODE_BUS_TSZ_HALFWORD 1 +#define S3C64XX_SPI_MODE_BUS_TSZ_WORD 2 #define S3C64XX_SPI_MODE_RX_RDY_LVL GENMASK(16, 11) -#define S3C64XX_SPI_MODE_RX_RDY_LVL_SHIFT 11 -#define S3C64XX_SPI_MODE_SELF_LOOPBACK (1<<3) -#define S3C64XX_SPI_MODE_RXDMA_ON (1<<2) -#define S3C64XX_SPI_MODE_TXDMA_ON (1<<1) -#define S3C64XX_SPI_MODE_4BURST (1<<0) - -#define S3C64XX_SPI_CS_NSC_CNT_2 (2<<4) -#define S3C64XX_SPI_CS_AUTO (1<<1) -#define S3C64XX_SPI_CS_SIG_INACT (1<<0) - -#define S3C64XX_SPI_INT_TRAILING_EN (1<<6) -#define S3C64XX_SPI_INT_RX_OVERRUN_EN (1<<5) -#define S3C64XX_SPI_INT_RX_UNDERRUN_EN (1<<4) -#define S3C64XX_SPI_INT_TX_OVERRUN_EN (1<<3) -#define S3C64XX_SPI_INT_TX_UNDERRUN_EN (1<<2) -#define S3C64XX_SPI_INT_RX_FIFORDY_EN (1<<1) -#define S3C64XX_SPI_INT_TX_FIFORDY_EN (1<<0) - -#define S3C64XX_SPI_ST_RX_OVERRUN_ERR (1<<5) -#define S3C64XX_SPI_ST_RX_UNDERRUN_ERR (1<<4) -#define S3C64XX_SPI_ST_TX_OVERRUN_ERR (1<<3) -#define S3C64XX_SPI_ST_TX_UNDERRUN_ERR (1<<2) -#define S3C64XX_SPI_ST_RX_FIFORDY (1<<1) -#define S3C64XX_SPI_ST_TX_FIFORDY (1<<0) - -#define S3C64XX_SPI_PACKET_CNT_EN (1<<16) +#define S3C64XX_SPI_MODE_SELF_LOOPBACK BIT(3) +#define S3C64XX_SPI_MODE_RXDMA_ON BIT(2) +#define S3C64XX_SPI_MODE_TXDMA_ON BIT(1) +#define S3C64XX_SPI_MODE_4BURST BIT(0) + +/* + * S3C64XX_SPI_CS_NSC_CNT_2 is a value into the NCS_TIME_COUNT field. In newer + * datasheets this field is defined as GENMASK(9, 4). We don't know if this mask + * applies to all the versions of the IP, thus we can't yet define + * S3C64XX_SPI_CS_NSC_CNT_2 as a value and the register field as a mask. + */ +#define S3C64XX_SPI_CS_NSC_CNT_2 (2 << 4) +#define S3C64XX_SPI_CS_AUTO BIT(1) +#define S3C64XX_SPI_CS_SIG_INACT BIT(0) + +#define S3C64XX_SPI_INT_TRAILING_EN BIT(6) +#define S3C64XX_SPI_INT_RX_OVERRUN_EN BIT(5) +#define S3C64XX_SPI_INT_RX_UNDERRUN_EN BIT(4) +#define S3C64XX_SPI_INT_TX_OVERRUN_EN BIT(3) +#define S3C64XX_SPI_INT_TX_UNDERRUN_EN BIT(2) +#define S3C64XX_SPI_INT_RX_FIFORDY_EN BIT(1) +#define S3C64XX_SPI_INT_TX_FIFORDY_EN BIT(0) + +#define S3C64XX_SPI_ST_RX_OVERRUN_ERR BIT(5) +#define S3C64XX_SPI_ST_RX_UNDERRUN_ERR BIT(4) +#define S3C64XX_SPI_ST_TX_OVERRUN_ERR BIT(3) +#define S3C64XX_SPI_ST_TX_UNDERRUN_ERR BIT(2) +#define S3C64XX_SPI_ST_RX_FIFORDY BIT(1) +#define S3C64XX_SPI_ST_TX_FIFORDY BIT(0) + +#define S3C64XX_SPI_PACKET_CNT_EN BIT(16) #define S3C64XX_SPI_PACKET_CNT_MASK GENMASK(15, 0) -#define S3C64XX_SPI_PND_TX_UNDERRUN_CLR (1<<4) -#define S3C64XX_SPI_PND_TX_OVERRUN_CLR (1<<3) -#define S3C64XX_SPI_PND_RX_UNDERRUN_CLR (1<<2) -#define S3C64XX_SPI_PND_RX_OVERRUN_CLR (1<<1) -#define S3C64XX_SPI_PND_TRAILING_CLR (1<<0) +#define S3C64XX_SPI_PND_TX_UNDERRUN_CLR BIT(4) +#define S3C64XX_SPI_PND_TX_OVERRUN_CLR BIT(3) +#define S3C64XX_SPI_PND_RX_UNDERRUN_CLR BIT(2) +#define S3C64XX_SPI_PND_RX_OVERRUN_CLR BIT(1) +#define S3C64XX_SPI_PND_TRAILING_CLR BIT(0) -#define S3C64XX_SPI_SWAP_RX_HALF_WORD (1<<7) -#define S3C64XX_SPI_SWAP_RX_BYTE (1<<6) -#define S3C64XX_SPI_SWAP_RX_BIT (1<<5) -#define S3C64XX_SPI_SWAP_RX_EN (1<<4) -#define S3C64XX_SPI_SWAP_TX_HALF_WORD (1<<3) -#define S3C64XX_SPI_SWAP_TX_BYTE (1<<2) -#define S3C64XX_SPI_SWAP_TX_BIT (1<<1) -#define S3C64XX_SPI_SWAP_TX_EN (1<<0) +#define S3C64XX_SPI_SWAP_RX_HALF_WORD BIT(7) +#define S3C64XX_SPI_SWAP_RX_BYTE BIT(6) +#define S3C64XX_SPI_SWAP_RX_BIT BIT(5) +#define S3C64XX_SPI_SWAP_RX_EN BIT(4) +#define S3C64XX_SPI_SWAP_TX_HALF_WORD BIT(3) +#define S3C64XX_SPI_SWAP_TX_BYTE BIT(2) +#define S3C64XX_SPI_SWAP_TX_BIT BIT(1) +#define S3C64XX_SPI_SWAP_TX_EN BIT(0) -#define S3C64XX_SPI_FBCLK_MSK (3<<0) +#define S3C64XX_SPI_FBCLK_MASK GENMASK(1, 0) #define FIFO_LVL_MASK(i) ((i)->port_conf->fifo_lvl_mask[i->port_id]) #define S3C64XX_SPI_ST_TX_DONE(v, i) (((v) & \ @@ -112,16 +118,13 @@ FIFO_LVL_MASK(i)) #define FIFO_DEPTH(i) ((FIFO_LVL_MASK(i) >> 1) + 1) -#define S3C64XX_SPI_MAX_TRAILCNT 0x3ff -#define S3C64XX_SPI_TRAILCNT_OFF 19 - #define S3C64XX_SPI_POLLING_SIZE 32 #define msecs_to_loops(t) (loops_per_jiffy / 1000 * HZ * t) #define is_polling(x) (x->cntrlr_info->polling) -#define RXBUSY (1<<2) -#define TXBUSY (1<<3) +#define RXBUSY BIT(2) +#define TXBUSY BIT(3) struct s3c64xx_spi_dma_data { struct dma_chan *ch; @@ -664,16 +667,22 @@ static int s3c64xx_spi_config(struct s3c64xx_spi_driver_data *sdd) switch (sdd->cur_bpw) { case 32: - val |= S3C64XX_SPI_MODE_BUS_TSZ_WORD; - val |= S3C64XX_SPI_MODE_CH_TSZ_WORD; + val |= FIELD_PREP(S3C64XX_SPI_MODE_BUS_TSZ_MASK, + S3C64XX_SPI_MODE_BUS_TSZ_WORD) | + FIELD_PREP(S3C64XX_SPI_MODE_CH_TSZ_MASK, + S3C64XX_SPI_MODE_CH_TSZ_WORD); break; case 16: - val |= S3C64XX_SPI_MODE_BUS_TSZ_HALFWORD; - val |= S3C64XX_SPI_MODE_CH_TSZ_HALFWORD; + val |= FIELD_PREP(S3C64XX_SPI_MODE_BUS_TSZ_MASK, + S3C64XX_SPI_MODE_BUS_TSZ_HALFWORD) | + FIELD_PREP(S3C64XX_SPI_MODE_CH_TSZ_MASK, + S3C64XX_SPI_MODE_CH_TSZ_HALFWORD); break; default: - val |= S3C64XX_SPI_MODE_BUS_TSZ_BYTE; - val |= S3C64XX_SPI_MODE_CH_TSZ_BYTE; + val |= FIELD_PREP(S3C64XX_SPI_MODE_BUS_TSZ_MASK, + S3C64XX_SPI_MODE_BUS_TSZ_BYTE) | + FIELD_PREP(S3C64XX_SPI_MODE_CH_TSZ_MASK, + S3C64XX_SPI_MODE_CH_TSZ_BYTE); break; } @@ -799,7 +808,7 @@ static int s3c64xx_spi_transfer_one(struct spi_controller *host, val = readl(sdd->regs + S3C64XX_SPI_MODE_CFG); val &= ~S3C64XX_SPI_MODE_RX_RDY_LVL; - val |= (rdy_lv << S3C64XX_SPI_MODE_RX_RDY_LVL_SHIFT); + val |= FIELD_PREP(S3C64XX_SPI_MODE_RX_RDY_LVL, rdy_lv); writel(val, sdd->regs + S3C64XX_SPI_MODE_CFG); /* Enable FIFO_RDY_EN IRQ */ @@ -1072,8 +1081,8 @@ static void s3c64xx_spi_hwinit(struct s3c64xx_spi_driver_data *sdd) writel(0, regs + S3C64XX_SPI_INT_EN); if (!sdd->port_conf->clk_from_cmu) - writel(sci->src_clk_nr << S3C64XX_SPI_CLKSEL_SRCSHFT, - regs + S3C64XX_SPI_CLK_CFG); + writel(FIELD_PREP(S3C64XX_SPI_CLKSEL_SRCMSK, sci->src_clk_nr), + regs + S3C64XX_SPI_CLK_CFG); writel(0, regs + S3C64XX_SPI_MODE_CFG); writel(0, regs + S3C64XX_SPI_PACKET_CNT); @@ -1089,7 +1098,7 @@ static void s3c64xx_spi_hwinit(struct s3c64xx_spi_driver_data *sdd) val = readl(regs + S3C64XX_SPI_MODE_CFG); val &= ~S3C64XX_SPI_MODE_4BURST; - val |= (S3C64XX_SPI_MAX_TRAILCNT << S3C64XX_SPI_TRAILCNT_OFF); + val |= S3C64XX_SPI_MAX_TRAILCNT_MASK; writel(val, regs + S3C64XX_SPI_MODE_CFG); s3c64xx_flush_fifo(sdd);