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: 766809 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3FAD71EB46 for ; Fri, 26 Jan 2024 17:15:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289352; cv=none; b=dPC+Iv1N6BJ1XKzccYu3jRmANDfLGkn3WM6OHOdJJuThjaO+tz8GzpMCvHRO8WDBFPJYesYKlkjmje/I3NfOTfLs9+3vtubXM7fe8SvaY+p0VKRZgZXD9ef/iCgTXfjpuX6nUUVONNGhKnRTMsQcKBO1TyJPgP5gkACDNMZZi9A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289352; c=relaxed/simple; bh=ESbWEf4Jl9fYqrFI7JEFHOnujDBpgh6Ob+8gu7+WPuc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=E4a81/9xZdHOOzX0n9MTaFVvNQlGR0cnM9rjFO4sARdPMMxL3Ox6qoFazOAEYabMF9nuU6dDnYzWZuJCfDEdGn/EpXgjKBjWgk0n5VMNxXbG0XZfpQI4Rm30knZkwM9oDywPbhkRbEAUSOg9VaYhb6Wqjo/q4T0QRBJ5EInDfiY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=zgozXHhi; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="zgozXHhi" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-40ee705e9e3so7013845e9.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=vger.kernel.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=zgozXHhitCfcIHbUu0rpKUXPRmyFrII4Dgqc59eKK4RyRtc3tXcotYu82pLT+SG47Z hbFRMg3xaDpDeqpMaZtGK5S+pkOxVBab9JSG1QT/p5RAwBxB1W1YTHjQInTovZCknaVm +t4MBVvx06tsA/mbsJC57v8wWhSmWxBiZaToXZUuTg1C7OXAOBDosZnh9xqqia0C+tTj JJ/dTiceArq2ZrbKAk8+s+ArPl2DV649rusGQwyXNnwPFs3Tm5jVhycr7zYkkw3ZAHy7 x+zr87MmpuwZgdJTnwA/WUgJEi5kCK0ClcJ729iyH+v8g/x1y/fBX/Eqql7MVCdnBbdA M/uA== 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=SFX02tFYM2lcVxZPDZ00cUwT8Z+G0InypHiJnh2ccIxI9BMB4i+IPUdtue3p6ukAWg d2iKsPoNMDe1YKoXhqf8LzzIIvgO1yji1w9c7JRW5t5fKRWljPjYsh+R6bjyflK6hHcF 0OM3NNofsj5CV0DWA2B+hZNk+RG7rny9AHxxwwbU1BwKXwG/TLAbJPM7HP6YLLeBnJD9 /yfJvN+BQ/uNC5InGbRbkfhPEtMNy1TdGMKFavIwN5nDykTa04wPVi6ygKzCLroDFf6l CWQcVFCPehf4jjkJHSAWYBkKQKjK7VvUh96yiK/NahXlgzrGRryErS4IRjzdaj3vsICY FnYw== X-Gm-Message-State: AOJu0YzhI6X6xxuX90EoeKQmS1GWV1Sb6NelFTcSu+ao4Gsqv9AMCnOO eXAL88Zt2osFYohzc2NGqqeCBv94QALFqion0awNCngrz9AGcfk55MFzN9HR6No= 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> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 767345 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 51E5C1EB4F for ; Fri, 26 Jan 2024 17:15:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289355; cv=none; b=huFbrbNZMhq8JpfWrksmVkt4CldPjYbwAFX4s1NJeft5jZJfxp37MESAfYMQfH9bSuqcECqKfiFp79du4AVMapC3UYF2D2jEd/B+/szAHpiLxB1gYZao1eJnOE0XqplHBJTDzY4UraSuoigf5yJvZyUg49ZoSesDa9ONW+MrzD4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289355; c=relaxed/simple; bh=c7iSgUJTrECnQEQ+PYY72b3yXlblzBzUREV9meR6/uY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NteioNEqjTrE6xM6VIu2UaKTzQPvjG3QgJ293nk8Cpr/s5hyuoHTSR2zXmq++t/APu3C1B71EPAjc3ii1TDdO0MR6jGRPV2OrbLcaxI3Bsmi0325UQjGsc8Lj0kVAvSlbpjLmnSABzgzbTA7DnVY+/pwJlc/TBvdIO/FhxHp3Ic= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=dpBlhoc+; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="dpBlhoc+" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-40eacb4bfa0so9729195e9.1 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=1706289350; x=1706894150; darn=vger.kernel.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=dpBlhoc+jYWT4TrtWnB/DOzlo4cVLvDDUoe+5lYzY2siAD8fD0PBCn8s2JBfe4jwj7 udnMYSssKs6SO0JavvUcaCrQRza4ssH0j6dxKTqI1qngOlHcec+EVbBNPfCM1IQL6/Q1 2890QU4OGv52nmTde4PialPCvl7Ql85spShd/FpZmahYWYBKgRWYtWzKT1KDfXA/saaM 84ioRs3IOl7U6zsAc9AWn+Ah7sp4we1HdYs/k/o5TEF1iQYVV4RUt8evINlI79QbTBEg jMBf8KrOy8kV6qVhedobIvOrBkzwLeHk27meAkrxLEXiM/+iIXrXl2YKeCEW9U0XiK3u feCw== 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=i+RMXIAMv42xEzJNHh1k0SBc6iDJ6q/25JA5+Fb/gb4l7+B1GoCOxMfZ9PllfEj5cp 2FkOn78JPPY5AMBNY7mtxeo+5cU+rlFLlr1RIkON0Qa9AqlFYinw02KzXo+4DT7Gp094 LTkFmCw1ZxG0LqzF/uir1/zeS8t6DzUa9GgGz9MAArf6Ft444gnSpOQtjK41zhkTreTi s5D/m3RTouQqsXst1Lit9B7Ry/Ck0kHbuXt+iAk2K2n8FuM4hs2qD5Q3rETYmJjQoHLF CQn9wpf858xmSlzh/w0lPABEkxax0/WGmHZj/wICXjMy9ucg43zWpMvEV4li2Au3Z0Mn HGGA== X-Gm-Message-State: AOJu0Yy4ugVRlyblJwcKiFSiY0hnkOo/MhZN7qL9AXep/YOj0ZAoreJm H/QBMwznM5VyAphv+5PnkzrfpdPC0hNrXqwGVJnZDYEj2QbewuwTSP/UELZSTRk= 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> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 766808 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 821FD200A6 for ; Fri, 26 Jan 2024 17:15:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289355; cv=none; b=ss+0FGpSy+jUCtb+0A938f8MYQOgHxBuKVTpYUKtPbELVj8ipzFYIzaBj+0jFM9di0TKA63ca4eODmUwsbGybSqwHN4t4MEOsbdfyrgvl/1hP5VfuvsFdYuhwUqZvwzfo0kfXasbe/AUZUmQnpQx30ct8EHsjHK6DjwNfaOFEvY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289355; c=relaxed/simple; bh=/bUj8RLEZjYthKdQPh+B31SkdTcIYenu7ITI+3MnkQQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rX+6hvaI11wQNsNmqVXj8B7PmXghUKXBSab3tIphxs/ipWfPAHPuHeHUnBu0g2YvjXKzZpomIH0VQ5HaF5dy0vfOd5XavXWY1vxv7cDIonr+zEhcc/SShBatyf0Lbbo+jgioAZIk1hOFD6WyNLEJhEHjsH66Da8yOIjv4D9iL2E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=j69YWkrT; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="j69YWkrT" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-40ed1e78835so10008185e9.2 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=vger.kernel.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=j69YWkrTdXJh3Sc3GxAPdndbbSVV3eHyHsLn7hnXdDGFmAHH4bttsILKKx72ht9qUv QN0ktjRpWHjoT9STE+Nsgq5DsIKaMtI4sZ728lO9GmwCbkPX1bZG/n0/WD7dPOEwulC0 ig8RHeGa88NbXzIv6ai11WDZKPu3v/R7pmZkETPiY5qTA6nhtTgbE1w9CbF7NCRansUU nvM1+XlpiuHMBZ9oW1pF66jMU0bhaDAG+hY+HWtls7ODggFg++v5Asz/NdjBxyiQzg+e 3YV+4/CCSVk4SIkmU3+ROp2iFyO4L7XjPUPYaRmFWYn0MQeAFEzAxNkwAs6iTfvSRWix OZuA== 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=CRQ0Q2TtKT41kEMSww/H/S46QNGL4Kn9njsDpIHG7cnDWSjAK3TlFuwalP+BjXXG75 JNpi7v+9jevAQc4pgVbFTAhPaKrPCanrJonBYyKblS0GDNcqU7xKoSC/IQjsn4XLuQnd EznKMz00RWL107kYw+QehlVmU1mtmnhCTOPGvqgkvANmz8jbXCkF+170FifdZFIKTO9B N13MK6otaMbaF31WMunH283uXV7jW1wkArbMn0KuDloDXCuAU6xHHAAYAuWseM2NEdlx wToiRgRfkqKNr9GUZBbC272CViuVkYGw+i9uo8gLHFJcqp5ESf2fSpNMv5gx1ftNB0xe m1dg== X-Gm-Message-State: AOJu0YyW9A0B7Fb8YhOCrFxfsFF9W6TD1pimCiQ3aAjdg3MpJ+3GAjkQ OWRUyy1AMxQeKvJ1xwEt/pWAl3FvBRFkViKJ6BvKOagHdIEMA7EGQ7CbVwhfI00= 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> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 766807 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C5E02031A for ; Fri, 26 Jan 2024 17:15:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289356; cv=none; b=LRD4Gbkl++KI1B8tcot4UAoRzJqySJpAemZL5Tmap7sM9KQ8/Y2RG6vGEHuIz01H2TcPEzl+c1KMSbBcl0JmpmHEf4DcxIE1M+R7ihPJlwPRHoU5l1Ome5O3fe4UwOjvElDyi5xgvxAqZdS6TjZRuOAInaFcCY7rlEI+a2CiozU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289356; c=relaxed/simple; bh=AoGW2GcL8h1o+dsdkCi/8xC5olvRIKqtfKKZ6T6LaHA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sFgPP7rFU6VmI8r45p6DCohEdwWC8SfGl30RkJ7XAqXVTVx3Q9shb5Uo17+KexwTs24obOqzgYmnOdbfsf8d8dX57v3ByCDYO8mwGIMhQLrxITGdz00VmMQmHMAZw0/SFyRlaj5/QEnuqPJBCQR2fI0gvKygKkIn/U0Uq1HaYiE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ltzeatPy; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ltzeatPy" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-40eacb6067dso13098915e9.1 for ; Fri, 26 Jan 2024 09:15:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289352; x=1706894152; darn=vger.kernel.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=ltzeatPyGovRRuSoHwtx6y16gifwv0P4vzl5R0F96oETsy5mvGd0k8l/VL4WPufwpr KGYVSBrwcNzE3hd9U/5Zjen0eWz/aOvM9tY98Sku2CL6AjBA4XKFHJyJR8RgU0HjB8Ty EPpWAC9QfbTNZcHEw0DiOyk/ikiaw9IOYlbtBPvdhBvX/cNWolC9f38udZT3c92A/++5 Z+1uMpkjlmFa/rHpJus17zKDVyN7XK3XLj4FyR3xget3jLiYwClbQ1OJzIq8mODC9AWi gn9uhA9MU1ESVCKne0uOyiFP5wfCCnSxGQOHVV/1zPrcth1wJcrmxeT7IzGOq03buI/Y qKYQ== 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=PTh/y06J/8OPS0sKsJZUpqbg2KjMgoNR7U9H0EjHTELluH0ha6Y3G6kQiWpyi4pZEr PUPQqx42JqEJx1L0jk38mdIhiP0N+LncKHlCuaqbB210xG0dH7CgQv50As9nAloXBjQD QUpmNmlzCZBw1C9Rt6Qa1w2RZSFZhkQHwqB4tEk7ctb5MX9xpGQAxEuFe2RLWVOhA0ja zdgdEQAisnErcxA3IvpztrHpfU8m5b1v8zwMrXMEeI4W7+cTF94HIi3uvqL1W05Y93Eo g6hpyOX1N4c35rYjF4Fz14ZF52I3Lzr81ePiFQ06NUjiAJ1hJQ/HwPIRGaZDENva5fyi +UmQ== X-Gm-Message-State: AOJu0YxEn09hF+ypZ9f1TlwBjeb6G4beDfT5ZXOBoNeY5U6e/RuTU6iR /3+kFKVfvW/RJqDcToevNzA/8x78cbwYmeYthnYhGronSjpfMpKpS2EbcV9SVkM= 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> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 767344 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A0E2208C5 for ; Fri, 26 Jan 2024 17:15:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289358; cv=none; b=D9zIKmlPbaBPbo8eZdWwla7q6Ri0Wd99ZDyXGmzsnMLLlLIPawnySwAems2iEpiwQ3KU7KPjqvo7MABezyYg9BsV5yIDtiRXAaNeMmYj06XRZq2qv2hxtDe/ZBMMGD29QfJjQxO/MMtP5q8vcwoKByP12vQeFffBezfi7MhNhQo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289358; c=relaxed/simple; bh=SStrJwQuFa7t2OvEUi2J7utQ18708QxGZDcStbXQU4g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AkZYz4lygEiK6HtAvwrzH/vlJ13fOTa29hN1YdmeCPmDG8VmrLT4irSaNCkS1KLD1S0Z8iMFmYmZgC2GLHU7WQmmkaPOD793EXMqUPEnCvkNUP0Ko6K+EqS7RuqGqKNwox8kU81MypqBLiSrHZPya6WYnQTEejJDO9ErpyRvm34= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=FxAY51LU; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="FxAY51LU" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-40e72a567eeso17511725e9.0 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=vger.kernel.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=FxAY51LUi9OspEcFira0wkFHPPrcf9UZD5V9DEnl+Xgs/EGNaL3WiZP6JBpYqk4bC8 c/IC9hulKhfIUHxgpPBY/xwSEDPRS0JmckFKirfaFvwpLc/ta0JqqFqw3UtkV6rfB4A/ Y13M57fXvcXjR+9/LbLTi3G3p7Apu5YQgW+VNDfbd6saImPVlayoC0WnBsIknVaAYDzV d0/fh5/wy4d8EfvQnuzrkj65WWGlXAetbCthaVGxoYEiYGvX705gwiagrDsVkC7QRMbF FryIy72zZI4mhuY2kLIkk/8RJmxog2fDVTYknzDCLumyS+Yi06jqDZqzIIEUrDr1n5so PqSQ== 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=ioM5MO108Dnueq++TPUQBAhVlqxL5OpbNuC90ts9/bSeJEBnag2tE8TcWTbw/04VxM PANtwm70+z9OYiifNRxaIWkyRMxIQWOmVAQM+ZSVbCdaQG0Y7KpsFULiVGvJWVIpLHxM tJV8Qc+8/rD8cMcXkXZzZmA9+liLIWNHZutVFVYnkQsdN1wzwYUPjM/OqHxjtpQ0Gh51 4TA7ZwTLlReQHEdhxTPt4qvG7MH59STpKqJwjmMYCoyiPG8iJLev7D/m7M0bK0ma1pyP jOtjC5gtn4lHkC6LFMaEAzy8ZeFL95yCWt13qia6CHr924EcWLWlXadZYsFBWjyEW8nm 0S0A== X-Gm-Message-State: AOJu0YyyHoL7VJCtKTkluPVLKCJTMP8EoD0F6C8NYlxy0d1nPFbaVi2/ 4cD6c4wHBrkanXyMB7+uE5JHYRYjaMtk3d8tUpajkWy6QN9yVfJBKf7LAlcmcVU= 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> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 766806 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB86E20DC4 for ; Fri, 26 Jan 2024 17:15:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289358; cv=none; b=YA3Wxts/qxjFBkAC5qYHGjKoqC+5zjOcS2VnC/DQkl+QDHKkPgDO3EthZqr0tlXr9hDAeWhbOxAbqa6ToIhD/mGxNK678IERFU32ZaAZY2qRYZsNPIMRWIvyDi3arRklZgEGmGbmFgnkdZ8ps6VN3BZ/JX+ePgcpAt5Oniw6zUg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289358; c=relaxed/simple; bh=VTX861XLM6xkP27hQbVL364w94zE9V+adeI06HzUo8c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=U4o9oC0ZOlY7+X0oH0qzARNuCDlcdXo3dkXvoHomZSLzZ4XE1xkpDfUI5zoRz8mvFTKUa70HIo3bIEQtEyyEkbSMgVVOQ4r77PWKdC5/4p0jTRBNwTbtCiNg7orxnm8fmhZm6dIlpsILnTlDVXy3n8ivF5VxMzINPL/GtBCH6Lw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=i+UqC9/d; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="i+UqC9/d" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-40ee705e9e3so7015065e9.1 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=vger.kernel.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=i+UqC9/dfzvyTTlVuhEwaqwNJQiuZOzSk/GTu1sHbj+stoUZLXpvvZ/aydLt4stxui QVYftd4yzJEYFPfX518e2EQalCm7E6WnM1ZdDFzcgCfS9pAn2bXn41EMA+Y1Iu055WJQ QZyz+MeI3Vpo+sC175KM+aNuEeqOHC27lwtNbvxJ+JGPT7Wp9u/sdtEHm0k+GDnQ08xv 4jMGGfN4SEy2kvQoNYgOI/Stdk+glqNqOmWfiA92cyVgMYh76Hwz6FuwLzcqSNf98ben OQihzj6UsYDH6uATHdNgFspFzwy/pDzurpf3J062Z+AFzBjKI425UZu66NTlMX/JqryD O+aw== 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=UXjnb5n/bsbMIiCA8gqwSd16n67b2rbiOvmTRTByb4inxzbdk/IP5fV9/iFKInTvrI 61fHLs+c9JzT/Pdu0nulOQp3vj/07lbk1/eS+p1I8RN42lGxkSO/U1v5c/LoXJqVUPoD 8bTWPNULi+wmgEGe7+jOKOOUN2Ji4E8W4kJ+4Bb/rzmJfULcRzyQI/ZgGlC6g0waGyMe ytGAqn78eNMrG15Wf5Q2PVxQNrCkFa/4zicmpndD4LKuwV0ttlYMnD49r564fViA0aMh K0ZQNFmuthVzIQ6HTPe0iSghm+pbIZcH8gyZv5r5at/h+0KSVM4hWYTfxo63AShEj3Hk lYjg== X-Gm-Message-State: AOJu0YxaxqJw60sw3x3kaldly67r54Q6d6HkecD8fivYKmIc6OHYusDE +C+Ze2r3lQgvgWmL2Eh5xkep1Fs/oZmQ9IVbdW710DtblBzjmg9EKR45pANwlYE= 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> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 766805 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4BE73210EF for ; Fri, 26 Jan 2024 17:15:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289361; cv=none; b=Mx3/0z6TXPWC1jwhLVynqT2yI4Z/hTKl9P1Nm1WqyyvfFWswjMoui4mteqeKB8YGhgdGyw02n0HFIoyaf1hBZwN8tZmZ39DOxwzjAL/gyH4eg5bQLnCDzlvRBwO3nvJRwQc+4hK32Wc4SlkhWaBx47MRRiDXswZ0vW025W793HY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289361; c=relaxed/simple; bh=nQYzWdDeWV5+4bKiItDoglDKTO/Dzi/wJFH7VQFwoK4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TDBJTP3lN9HW0qSjQehd9/d2P2uLnODLcZkiqzNMsNvfPjaBEaSZNd4FFGM/P2apG0HO7MOrBOGSevib1lBnLdttzrzDgLADm0keiQQcKIF7k8A4AB+8P7XYTVoa4xN4Yi8twPRVHR2u38AQ6RXiGnliLZPy/IX0kNLgZhU5Srs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=DgaahFHg; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="DgaahFHg" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-40e7e2e04f0so10064805e9.1 for ; Fri, 26 Jan 2024 09:15:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289356; x=1706894156; darn=vger.kernel.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=DgaahFHgRvra9fyLK0Ew2hU8rTEaMInlX+oVxhcRAEQycERtoRyv3iXJJGobSm8A9y z2bZt7OaQ8+8V8t7JU0KG9mDr6a7wvpvV2c88KNmiazwA2uyq759Kgf06/jS7dbQfyw+ b4jltwH1W9vtxO0iBdwoSy6DTrrbiZcvMIRPiZJfS/apItBmrWpYlYcDywFrtRYnBt9s lPUCvxpvSVtCBldaWr29Dz//4asb9PDuHT63JJMmsyzGZFTp4YYYYCfwVxbVmRlVCWuG YUNntKWAaBd0yAkhbeMYnggebBgn0nux3iie1Be5QmkIZpeMRFX5xqeiEvwmXLrgMI3P mK7Q== 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=cqy1cdwSkjgPSXX+xLwQGzI5o1qI+13uyRRmeLe7fdJ8vcF4TghAkOfy4UB+wUyeVd jFLEi+LF+is+G5pQL0WZKpxEDToqTR4Zfs0QijusX4Hi5aBcCwj+KboCW3YZ7zYwbrfc XimaqzSNJuotyWgP9KFZyzyRDJdQJ+f+Sxhm0r6WdHOS3onWrihG6/VU4UfeLU1iD007 jckGfL1yAIJAgtGo2x90/Yp50gbFr6gPySGgBqUgBD3NLiGVaW0jNZOTUawLd8bPRYrQ kBxmbdD0NC6zW3+dzB/wekUR+horZLjBWyhRTdh4se71jSbVcLe/w+WeHh/OW5vrxsgu OCSw== X-Gm-Message-State: AOJu0YykdTQ4kQRPilqYH0KGzdSPziUUvgL2gz6sC9AuSm8UFZihdnCx bd9yzqP0lAQEdR4zhSCacQyydWFEV+3JFezObXX7WXRijItYvHV1eLQPms3OCwQ= 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> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 767343 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76E8321358 for ; Fri, 26 Jan 2024 17:15:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289361; cv=none; b=ob8SzqA28ZT7Oet8zrs5Fywi9ofBXwRwEW+QVSVggKkBU/TlptGtMoArnuIDZ1zNeMsl5hrCbomcdJHCPZ1GBODqtzP7DGqcgsNTotsnxjn/FuLC0LGEb9qBu2dX2xnMigPaefHqvKbKzREV0Rg6XNTjfHjbjvFcRyM+EJcI2uA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289361; c=relaxed/simple; bh=sdxE7dtZ2UGuWO+rcbDjJI+aHitLSmW5QV5kKZjEQO0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EF1pGxxZbhRFkK0VW/MCtYlhXZ0+E4iUHkuUiHmpIdpVP0+puNTue4Tbcj/9ETlLVrYYIwdIif6Xmibd2WYC4t7goT6h6BT3DzjXreBqN44zulI2Erk08xwmLMiS9/PffJKihxFrk7U6M/dZyP7qtaKlNkm/lmbXsJufGWSIPIQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=yPl1UOu/; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="yPl1UOu/" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-40ee6ff0c7dso9656055e9.2 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=1706289357; x=1706894157; darn=vger.kernel.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=yPl1UOu/YtSB3RNckXuB/Bx+nE0HSlnqe4KTwgt8LWgo4R2UUyqQGPjJi781srZ9S8 mHz+rERjEi07sBDhmfhslGYoj7BsFYoWWVx0q2LJD4+YQhPjUKGLF9vyqWc0kkL031fp nrN2ZfQdWywvjg1UzfuUEBa59JrNFFHu8t5hJ07M4+j3sC41WOBg0L7FC5dSUa51YPgA oBwW0x3V9zcVna3YHrtn5BOIMx9DGVOa+i3aGhWqbLqzDHFgdf/XPsT9XPI4N5e3F1CB NKcwjUfFtIXBsqqRBqY5ofIaYC5W8hRFbP1HTNS8K4vzjR0p1odGU5KQ5GBSbz3fHnmA WSvA== 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=FxRQUHXhyyTMUbLQNM9v7WXvUB1SAaeiU7P95lQZ2I+ErVqO9eS6/CviGPUusufDF8 FE/9Q7i0N2Zb1AwHxOBMCGuA1ODZkogYj8TTdRLBilzV+KaDUDDjh1Bh0EDRye3BlA7E rnQrKM6+SfWAAJNeVs5OmQAI99E5imyjAB8jXRYZqIsj0WuCB/hP2OIuZHUYXKBROKTw 1Hb6q4PuwA8lue3ksh07Qyeh1RLhHWZwmJMxojYrJshVy5EHCzdrXki5FS6taPpDCzc0 1SVEDeiPRjXTFJ4Kz8OQynGnQlLYIXD0ozI/bEjx02VJ3H5QBqf5CEyDfMNWfeH8mtjR 59CA== X-Gm-Message-State: AOJu0YyJy+mjGzk3Kpo+nYEvZT6piF8rt93ujUyqYoFFUIgsI0GaH74p n42WwgORGCQvaPaSaEPk7YnmImaTL4g4Z5bqeXo3FGNu7/FQfYfkHLzT2Eh20ffAukJRTFqsxa5 kxDE= 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> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 767342 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4817B2137D for ; Fri, 26 Jan 2024 17:16:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289362; cv=none; b=goWxZktSE0KRppLSgEvdKG3fKWIttermpWJQN93YLbLiM2ATP4pVKZYPvhC4Mgkm4iVaO4NfT8Y+tQR2jzJKds23kPUv329br1u/JwzROT+aNRalFsanctlCMg9HxQDMjaRtMQnwYMzmcUneI4Ikwm4oZhaDz0fCtVlsglokYMU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289362; c=relaxed/simple; bh=y75/9iSo2GkpRcJq4gCYqWsRblkSJbNeMc1hgIQCUgk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sTQlzVd7pe974L8zf4QDQ0cxeyzDvMhsxSAZZh3eYo1bBZ2jCoz3qxlaRFgb931rQiRvDmOj9xBB0Ua2/wWWFW5sVYSrBpkv2EugBFCk2lS0A2J25HDcRT6FgwwIcatitegG2JecIf38kqBCP5TQ78AsH2edD7/uHBaFWh6qcF0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=EmT5LQtA; arc=none smtp.client-ip=209.85.221.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="EmT5LQtA" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-339231c062bso700196f8f.0 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=1706289358; x=1706894158; darn=vger.kernel.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=EmT5LQtAItRO7ZXqYBMW7rIn24QTq+SsoQPYpwRWmd+xFmG6h6tJsuA6YlpK0AlvUe vKwdnIpNse8PGM3q7gXB3PT0V02knPQfppEOuxPrrvwjFA7IK9KrYIagRFm7orOYhYs7 9DB0q3d59jAvhjHYYbzvVrlFBcDCJ8txEz0YezTv9uCL4W9osrcTKWshoaHKqt44ccw/ EXuQplMpKu68q/65diFVFTsw8PTrPF8sivLmrghVJv/IGUMdUKhgMBEZSovEHmIYSxJN dIhEix2B5nftI/59xoDrIvYWSrGA7xkAxiO5YZlPNyi5a/3PnHBq97V7qLGK+U5qxZdV TF7g== 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=pm6BeDh9g34VWR9Rvzy7UyBuN8NVOnUywGWYPGr/6LKz7r1X9S8yIHLGYZhPxUUzEO DVPDJwlV7o+pl7N8DBKRFpbyYxN1gjUzR+uoyAS65+qpN/485apBbCURJOOGIE4g/jFg LY46zQc1tG92IMUSga+Re6WcDMRI4lJDI4hb32LoqsOSpBzjsRmVpp0YLVxEt7LsinH3 x283LnLcZDDMRXew02yNbRKgXUiMZYHy9n0ApoDMzHgPaofBm1+C0u2XUqnRtfa8U8ZW 1Be47jjrKLgEQnrUr0SIs3TrQNnZkOYl4xtN7IwKRf6hQXCQvmKf+iqcPTzgtVp2UEaK CP5A== X-Gm-Message-State: AOJu0Ywovablx+oVp3B0Yz+ju3CE4d/sRJKjKAyLRIzasEA2BNMsfsFY QtRGDcyd1QUM37VGoixaQl/oGSIQjl31xPYQy7wPBlY30txZcStBNRhAtdi90yY= 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> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 766804 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 28C2B22339 for ; Fri, 26 Jan 2024 17:16:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289364; cv=none; b=YlmJ/Eca9m2KlKdxsRVisfZBM/KJ0r9SIdc22A/SM45XLbh4GiKWIuPYo755Z8UhErUcdzkRyIS53+4E/RZAJvT/tjmCS5Uf11G1JBkQqQhBi93qaCAkQHY0uOrQhtVqWdY/VvuDUbDhjAE6+YPQMdDIYuozxeh5isXwFWXEE1Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289364; c=relaxed/simple; bh=6rOo14Bz2JZpKcqmwTvyP3kn0DgWf85cl4VWFDXDtLI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=R4FJWfSDMteWwLKkUJPSAJrr6Rf2KW7dQFh5FtT27XWgjlAqBc0ynXJizcAE53A6YcmMrF6CrsEl779EgUjiH2CI54Ne/MrAotbjo0RDhShvzR9bUPYkMXeqKZ+a+CItIgXY/Ls+jJTatKas7ffmiXa0LKkOm13X/e/17q8Kxws= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=B2+25mnh; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="B2+25mnh" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-40e86a9fc4bso11019145e9.2 for ; Fri, 26 Jan 2024 09:16:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289361; x=1706894161; darn=vger.kernel.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=B2+25mnhwv7LvnXiDtp4U/HAV0Dt3LrvYKzqx+d+SKrCpWNP1PxINi/nopRPBfSeIz /MDGp7EZZ0+Fr/hfXV3v/2LVlTriaOj7Vjxkkj/ojXxPVyaI1QmtuI8dyNgsgDxVbHlt F0BTN83SRmDWbgDvcNJiYrHdrIKnisV4uwdSRBE091wjyJYNLyuFOQ/CBh2s/X6srAHE KggJs+eR7JdaPjN37WYp+lH3ildPhOtLFuh2cfwsNDbvQrLeZBK3RxLk94oLHicjBBkj mwEx5w2YlE58VTAi0u7h0/a0rr41XN7gpDFjIa+lg0zwLa3OS0VMvzIPBPuWRCTsYwTW B1MA== 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=Vc9Q7iesPHpje9DCu5R/e3SF9pwKmZsv49RDNd/78xDG7DWUuB0l80sOLZ5Hpfhser qvWlGYnYwOJ0Z9rTMxA8Tlt4wxQjrn/vEw/pNsjOb5nvT/y6kvnb6xMUjQOh82CHt54N X00egegRPykseMkXGfy+XRdhCHIzSvXG/pYeDGTVAU3tkNVlkciUmP2ET+CQD9pO90lC jklvzlkNmIG1BMXrVnXObQ4ShLcdfZWokX+Ki8NVRixwnFH/7edr9xZNSaTXv4agKkL6 4WMtM9b9mFt36XmJmcb1iLzuSLSTovMCWkxfDmoJYjYqcDJqfUXU/QY2YFVeWGsA7Yb4 QH5g== X-Gm-Message-State: AOJu0Yy10ccM8iSNtoaZqmgxdjtIduWnXZCPtTfZ02r9FkAZ3pHL0ZrO ILrKupwHPbtzavb6mb3p7HRJ8J7HzIjaBXKTGeUy1rxyNfHwPAYI61XNOlOXsWw= 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> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 767341 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 54410224DE for ; Fri, 26 Jan 2024 17:16:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289365; cv=none; b=kax++Xq1NLxYqffLdqKuHP9SM41WfjVAFDZW4Voa80wqQHBsxfl9HOU5kDcV34Cfbe83tJoNRGIcaLwoFCyOk0/IbU3Kl1Odayy8ZPV12OHcuuekC0NDxGlSB9pcpye//GUJHdiXMy5TyESrL2OOgyNGAon4OP4k4jX/5N42tsE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289365; c=relaxed/simple; bh=ZOMLiG8OpKK2k5js5KEUh5k6xN64DPRZwellQfidiYw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Dz/iVaK/AvNuZcjLlVzLicBGESnnFe7XAY2RAuqj8NoxscQt5DQ/m5OpuHuZqK6Ax38zpOsEIGbnqs/n+NXGpOMoUa2g9dvdtIzaAfpfXLdZvKQA3AI3CHC8QsUVF00EoJWNfb2tFKw34wWbdNdYOsuRvJ7Jxa+Rrf6AtgNxhQM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=HqctojUd; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="HqctojUd" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-40eccf4a91dso9317955e9.2 for ; Fri, 26 Jan 2024 09:16:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289362; x=1706894162; darn=vger.kernel.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=HqctojUdMdRyzLzKBiCc/NGuPgWigiz29JWXrj9WgiPdKiSblsUF8DjlBEkSQECi20 hn27Yq2Qlxg2+jWRCSPfKvRuWluTYzMOjXhaRGb+v0UnOA/2C+w2ukTGzM0GfPy+9ktR Yyyy7iEKz383zLTccJ34RbRlDugNu7F5allGe5ToGP5pjMewvNxTqrxTK0ztzDZJXJO9 Oj6529qcjZl3w3lJ3MOf9+aWrENMdPfHWqvedSV76nmS2YAG2cnH86/iyDk6fwnV3+bC AOVJAuhnsxOQ+hHr8giZHvLUTvqAF5irNP5u8DyA5aVY8A2WGOcAek0r8rWlqVpOv47V Ug0g== 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=IIKSvWpiqBIvxnJP7iZCg4xKZEUHFJ7nGwffVsg+nWAR+pYJry2FZ5xd6pp8UEZVhp 4JQHgSpu6qGERAIXYp1xtfn86qiMuGhUR/b9Y7PLe20GvfV9dLuW5jTZyvSVRhhDVr+P TUU9N/iouf9dQWx+24gYmygDepjdsC26ZqFXZmmKymPnD7xUwbLuNU0SCRfo1XOBTtpO L4mEfrJACpwxGkjDR7cXeyRld16CBvsibjqO+2sYF6DLVRstPUXYEz2PByE4+6AxGuux 2nNDX1sU8wtqRWlLFUG+gDoo7yxkzaOSc7ezCYIU69T6LJp67YpWfeIs6g8T7iOonQPZ uD/w== X-Gm-Message-State: AOJu0YyT8HgHNAAllgCOsjgTTTheKxtwSuegcjUnDtF3MhacNkBoXAxS g930vOguLuScK8b8b7dt5UrbKId7zZbHmoJ/pDCZ18LGSkCUBTCJ03/2NcrICy0= 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> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 766803 Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9AC682137C for ; Fri, 26 Jan 2024 17:16:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289367; cv=none; b=RYEut7RXtSw7lSvv7h5cbcxsIWJhTe8T2jstfepdnKFkgGhu1QNWHuVvBw/NUCzjy4s/aLQGcTFNIpbOT8XYuU2skGbqoNWkCPH3tK+juhNhq3nhOXxP3EfEeaRyWmU1QABrZXHyeqVyaeK62al+nN/6cHf/hyyrL4nviaH9grM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289367; c=relaxed/simple; bh=a6FJG4QFicbHTdcTRUUoXVt6YhxyTv5CKU8sFCbQbwI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LX4Ry+uUj3ALxqlgzGCvwlRGYXsv8xeORiIHymG5SUDkWF1M9pPv9R/ydnp1oP297eeZZtDWgNJlGJAEJj4K7u/gCzJLGAt0BASr3ldZ8uuXhsS3mUKfX78L6cFQPbYDbCqUCUZxoJuskAskY2T4SxSDu/ILmxGbLUn7DGj/ggQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=fucHrFmM; arc=none smtp.client-ip=209.85.167.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="fucHrFmM" Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-5100c3f7df1so856206e87.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=1706289363; x=1706894163; darn=vger.kernel.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=fucHrFmMijzQGYvuobb8+LEOf97esmp0UtM9WZ7JIjMtfXWekoq3jG42SbzBcSQEak fgi6S6aEtALDgQ19U8na+hlQoxLjgpASB89e9p2u0dxazQgn6gXVUv9rct3DOMyceank 0nf7F6iTvr6cok7g411Xz4rhbr4zUVmdP41Lqg9rYBdMPBvRHh4vs7cGP7CMZkMSZtA/ JhgXdV5UXtD3WKfgafPOef1/+QLMMQP7xQHEpCFERTXCdTEE2E9Dy7betaeo8Ft20SF1 NcgSYT0lhCR/+xdy/AIdNLY9G9Q0l9jpmwa1smJcP4BEdCiaM6CVenoI6Vx3M/75uP6N ibeg== 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=CFtIO/mWp0tche1+OglN1AUe+UxoA55Y9ek7nkxmulVuBybzrE/P09k3ahnurd9bSq BYPI3tQ/A1WasZjFXXmnv4TcPuffPoRpElLRYHDXSiMrPHLtSOUo6UrbT9S9/owhiZzp Qs6hSz0HaKwGKxOLvuAVsKSp+ko945N+d+KVxxiyETDcJ8sgN1qnDskgWyHuz/135Cpw zr8fqURKLevMCh3vRr1xnKb4IjrJjplOytdAg1fIlp/T1WO465PHLGvkbvLmBLFWSdRd woWe8Tlpo0Z9dbiF4nfQNbDrOgXBdNZXcnkr9c5kFHtElVvuyk3pV8ddji+lJisx4aka ax8A== X-Gm-Message-State: AOJu0Yy6+WJ2ijX7ewIZEe5ZnsPxsGDxWfWtyRbFGASpyc0+AaHv8yDH bjROdDcwcXqaipBLtmsWd7KuKrrs4S1ToIw4UWT2+X9hi66rQEayi9vu9xZXKfc= 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> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 767340 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 664DF224EE for ; Fri, 26 Jan 2024 17:16:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289367; cv=none; b=ummyO3sFvuYHEx/06xfAn/uVIA/2wmEQFlBcV4s/OJGbhOTC/L4WwsqXlqpNBrTP0tlZGUWlT5RNymKKapECrj+5mJCRiK/mbLQS4fFroudK94kxkUu7bKUjF6m5eEOIWST4PpopGR5y/hncC/7dSrR/5HcePBRm2ykCU30fl1I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289367; c=relaxed/simple; bh=qd5gH6HA0zeTl7vAn9ID3bQtUYcxhzqMjBdEahDK+9U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WbyHii1o0rB7Ve0SRvs7JxovB/vql60iYWjOX+Gq+rucAqjmiRaHITpRXX/mF8bgpxyCZwGZyCnRy5DqbJuJaWU2U8b9BCF1VQXnirQpleySZjzHwW+Gj9HLIj56Ovt7s7B4owNltOEyxE54cjfK04W+n0rIyM3IteUIJVXCYG8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ybizXlmU; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ybizXlmU" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-40ee82d040dso5844395e9.3 for ; Fri, 26 Jan 2024 09:16:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289365; x=1706894165; darn=vger.kernel.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=ybizXlmUgcZxVD2fq5vgJRFnwNeBDtqx74C7Dh2yPyZWojprfqebJoCwlAOHvgDXfF CPDvLC4+AIeRjHm9sQCQNY+BYaJz/VfY47C7j7kFg00COzsNwhi4RId73Oi18E3kdG6A 02f1nBrYvVb0HlH6Apptg3XCOTKVY+Fmy40njzdaDXK5A6RwIj2JTf12gSHBwxivNfQQ qhLNzN6a+O6hCyC8znVrSJiHw9kKBUKOwwv7rSD84ibyBI4OaCHJHdws4kAEM8M108v5 T4NzC+eAk4Ab0OmLPWl2x5BoBujX7WTZtIwd1RhKqU/oV7v2bh5uMEVOGLlYXzT95VXC hVTA== 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=UnYUushJsWiM6DZkyEb/ElYqjL+NlV3oA2nypm/E9RCABPSiPTP6aVUHuG1YqCSWun JPXD1bUm/26epPyQhJiuqOWLxWB7w6UGUT78+ifF0Ansvs9vMRFRnVMktF9LN/gkCEka neO8ltzRrvMMgu9924boXlpBE1VdbmlEC/llFzefHlNMZ5fEYBRKHOO2x6GMUpjAOA6v JQxcCYs+As5hUsEFh+m/vVkmcxwgCvmWUYPWwdZTCOhTTiH+97YG1WuGHBXnkJkDVYx0 A8STHXTS+lVRRffH6RfaBli8HPuo8EBGq/czC/KkhMDAXQdOdbkX+z+16vi3yFGg93fP U+Mg== X-Gm-Message-State: AOJu0YxcgQtYlMMyZ3plsAUKsQUUoo6Y37eeh0i6rYk8Vz3oZQEwe4rn scH7izZaf4doy8uqBbeDvi60zAEtR2HKs7aTAb7zIaU0tUEAg1yM6Pv4Gwpco4I= 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> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 766802 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E33AD225DD for ; Fri, 26 Jan 2024 17:16:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289369; cv=none; b=lFGrQSyTLlJsCkyxZDPWMKQv90uBjrH7L0WS3BI+7jwbtNQvvuR76+zmpfWC7JaextTIyL9DrUkca0Ma3BBGy8SvYwLrtDSqqdENC0zrTR6di+mSzKz44llex5oJ8PWHq3fv5xdFBidnPCr61vEuDz4bX63F6URePFOwSSxgmdU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289369; c=relaxed/simple; bh=raOIdRyhO8tHaPvaux5xDqf2Hk9QTHy/XAkEcRROgas=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LC/I+et9ST9gc6IwnzM6Zezv54aqmO4CWJS5t1b17G1lQhCMURWz729yn0BNQefua8hze4KtETKtDuSwlcISUvSLzdUsYfjFv0q3lXQlPL6E2v6rwKQrXK6WI/Cl+3OF1raXeR8nstAm9l0GlhHCorJAHT/fr6B1isSjepVbEu0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=afhk/5YR; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="afhk/5YR" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-40ed1e78835so10012655e9.2 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=vger.kernel.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=afhk/5YR74/ZEy5ywVT8LbSHfOvT5u9TpYE3ou5/fO8jF9//waWgPQOH+5YPjdvaQa XEaYf++hM7ixBJ6UdSA6mew98hYKVSKYK/HGjHBE7t9Rt4cCwEPrbRJedvaq1pOmLH/v IjrLXM4LZ4Ll0rmzJ8QiqnOzsNHzdvisBNs6LmsPwjWv2a53Bvm7q9uKLQjfjhmnIc31 sFaXE0ufEEmNXbHLi6oDQPyp/aG8E0OycJCqqAMRljITcAgb+WDDL2gdvRsBnDQmEJ/g hZDhE38pEclpER0kqTtYPF98AbaElDMBczjQeACwE1D7c3Ss6UrDov8ozlndYL+L0JSi flqg== 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=n2Zts+gyZXFLLlKxRuzOXeJ/M8G6oR1TJiBbk9d3JHJLNPswODoIUUl7g5h160t5iN e7tnq1k17iu7PB0fdGuobmpOqgJtMjX5wuNTEPdBvxFMNCS12SkhgsSF1BUrySDodNjB oWfILK2+ebpeox8oWlAOt7Wf/+KGh7xf7DfMcn5thJpqV77T+SotqsGZh1d7tIOuOvuI cuouN26aLmkrQA4mGvppDMV97u0sd8uFK3smfId0eIN0K9EKKG35sn3n6Tp/C69oR8u+ W2jUfHf3F3kiX/PTWWHvuUVAclyiKUKbKBO9LaKvTKRHw9bRDfTfnu2d2pdJVjRC0Dy1 0V4g== X-Gm-Message-State: AOJu0Yy2u35Zouf4cWe8YOi47E01QsoxTZwSLw5+Kd3pQvcQ72D4srH6 BekPMyqSL62tU4ewDp7hIN10jT5YVSK7H9AOFjvkZgchXsP8cui/OR7T51lKDTQ= 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> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 "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: 767339 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B28E12263C for ; Fri, 26 Jan 2024 17:16:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289370; cv=none; b=oKwj0wx3DgIz2nBtre+E7nAT/CIb+EW5ty5dUlAuQHYoFv3/aD9x3bPdtRLzecWhoQUpBUU9p1snnRbY+VWfQQuAPLUvGzhc9rPjgjcW/aFwpTPy95n3yxzS/E2b990MbPIvoPawJ8iyUmuM/xzBwqnwlLkwlsLVoRu3X+ynGg4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289370; c=relaxed/simple; bh=bGD0Z5hPEY/4y19pgklQ92T/GvTwYYstRxsthohCGMY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YPpojwKfwDpyTg27wz6vInmL+Bg0Fs2nfsB60T8CUT654L3ah9QjWaZ1Fxyl595GohtbDvAvuSXJDqr3Gblu2YoKsiT9GZBnXXpZiOhlJ0t2bHuhQ/xAtiduPYSPuofRgB0yon963Molm+TYHRUoKyv8fUlRNaQ8qaO7dhuh/oY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=sz0euFSo; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="sz0euFSo" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-40eccf4a91dso9319115e9.2 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=vger.kernel.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=sz0euFSo1tA8ZuAwZ/qaaVEGDTR64Vio/AYZqgMBmSC0W7AYL7EVcWDCfzQ0/KlPJE d8EFOoE+WAbi+rvAk50257HRG/0LkPfIXMQ49LwnVdc8kiC7jCYtB2aa44rs/D1YK8wA GMy1sRvc3BfPrBkea883hS2QFpGl4mDk5gX5jHpsru964GVM8y1WhdEQqzdH8vJujPTO QuKWF5y79TqpGVSFRn8KD7OE9mgBzTjokb4OLkFRcJn2oX7Zt+zi8x33zFBrOGy6Vxx6 cS6/JGDo2YzPeFGXyeitJdCVAVgSFf81+hdF3OI5gcqQTCBEUuvMkX1g8XLJ/iElpe7Y 067A== 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=Jn8TgXTq/B1CeG6/4rJQw5yotRwoqqlRQ5BVZv820YULbxrOV4woUJcoIANEunH3Iz ygK0hfETOZopkZusgu1HmWiA/zYjMmgXHB1v7riw5jN8fDN+9z7D/63pSDkM9Bhp/Vt5 qAdT0g6x+F8Mw/MXRQ6OyGqRXf8RAjXu1qfK8asKHpCLHPw1rQd1E+c6X959bauMnIAE 7aXWjc/tdPKYQr6kiyZNxCpKCnw3653JJGAr2wS+80O4LXydg7bX+PIDD160A8if29r7 vXwsbYMXfJGEoflJ6nZTO+rwprhppXBxejK6/a1HpwP7iNHoUZ4uuWqt7j1C1sv2NVZl 5bGg== X-Gm-Message-State: AOJu0YwsbQMhQKgvKWMdBq629HMXGPrS1M+MSpIcTG+LQFMf3sXgzbQr MHlztlxsZ6757e7RdZQy0wIqoj1i8E8zKB50+0PFyWVoJYzpF1GRQWhIQ/D/0Qw= 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> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 S3C64XX_SPI_TRAILCNT brings no benefit in terms of name over S3C64XX_SPI_MAX_TRAILCNT. Remove the duplicated definition. Signed-off-by: Tudor Ambarus --- 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: 766801 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D334E22EE5 for ; Fri, 26 Jan 2024 17:16:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289372; cv=none; b=VwMhQXzxKtPyw+EZIg0OubFeRQjNHelQ4Z41RSwyb+0IkLk6FvSmP6dxpngORgGdJyv2BZN0C1e8pVfey0Nan+i/jtYNxWVTxlsKceOHtRibAyhSk8+EQOwVx3tzMLPH0GMbl6vCQAnFfCVnLFXr0yZrE1Zpw1DC/bgmuqrIFrs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289372; c=relaxed/simple; bh=Lda6uhylzUEwPqctZ/bYWn6dBNKjWS7g/L6QLlibWu4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BZIh2vhx6tJakTLovthlyZj1MgYD/qONqp1aWhaKW6O2cBSZYqCG8xdZjTCB256i/TsbMvDdhapGzFJd5fngxmOj1mVIogkoWtcnfygZ/23LPZ7ARC2Lwm1J3/8RdC+OUrjjnzZLEr96bvxrOk57RTVxujqM9l6+TtrRoLLdDqI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=qtJIxCz8; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="qtJIxCz8" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-40e7065b692so9309815e9.3 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=vger.kernel.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=qtJIxCz8OkSFzWLgDtIjstS8l0+8d/rbf/fgq+ilcKgyEzuOjb+oo8rx+UbeCE28nA sXCSI82Yalf9Mw5r4liqjeI5yp8v/DWV0YjW7UvOE8Eucbrl0Rw/5GVw7fSUDJxygVNK t6nnSW7mPLZg/4XnqIS8rwcKQul5f56j/4t8h/sb6P7cooZPSoVEI3SV1//qFUXL1Bc6 6t1RMPPuY8+jpBW/3xLOnimhdwBxZ9/gKiv06NwwyvSTUwK26Yi+WJHwy6rrgWp7siRO fLO7TOZKi91PnLr2+24Shj5qpF2VVjNxnC4J0fPmUVvlw9OZrX00zVMdEOpTGgnVP6h2 katw== 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=Jnu2iec24fxUrZ9MumSvSvVuhM41JQ/JsGLVIn0ZMJ6lNwwudnUdE4MGLU/QTKOwW6 4N7Py9HQociYW7Or9oEpsvE4A4klUTyx8qK0PKVbbpXoLzfHv1L3GHDaM3VGFOMi3CNl HHrzthEPFTbzlzrlx2NR68U2N+r0yem4rubXhrbBoLBV5GOUu5pHBZ9h3kXvhwOFsA+r w54a0fH4SdBZELGARd9oIQtBmbtvTFGv0HQZMyV6Z3lJgX8eRaX8QDyHt20FvZJv3yuo J/dLxx3D6Vqsa5TqsFkhAbUd0ErCYPiUPTZ3clRx3Gwh8iWFQ1xXzNob/M6ymyVumpH0 32jA== X-Gm-Message-State: AOJu0YyAu5CbYGBL21vOV5WUBzN+TGAGMkjBO2DDuDC0Sqcz8k7FqMov b90TYcYNSZEj7O6oaxs4fXa+cE5E5HjgeXizLxXNXQCmRQ3Y4yexW5LxGxV4YbE= 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> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 767338 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13E932420B for ; Fri, 26 Jan 2024 17:16:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289373; cv=none; b=Re1E1qbQu0dybkbB2BJbD9/xonJ1ee+j/+77J2Td1IpGZYUdPxGoxHFt3PTR3ryV1rG8ULBNLbtKbXeGAJ+uYvhkp7iKbAH68IfUomdhNoPCEq5lwhJksBB7d/CEFy1QND1p19zat5AVMOOP0tE7ddbFjvfqXqfTFdfv7OT84R8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706289373; c=relaxed/simple; bh=u43UIwJQQPRd8BMB6oRBKWy41Vqtce0E/hu8vqcFXqI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YoKg0zBfIBGbvs1jm9e78cTyf1ryhrNEMJXHqdF4Ol/fD1IN2o9nstKNWKiKD8NKd7R258XR82Taw4NaX61Nj1dQUMdZK1j87HQXEde0ix16nahLGR1KxBE7yrLQS08Y7y0O+JrQQu/8LAre0X1UI86b6xKVRV4OMz53LffcvpE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=RkBp0x9w; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="RkBp0x9w" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-40eacb4bfa0so9733495e9.1 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=vger.kernel.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=RkBp0x9wVviuoEdARkeZxjcm8s2eJv59bpm4rv7tbqwtDFJsQEK0cxHtSmATEdcU+G Q7L3PSR8MqoFIp6apYEG/iwCcMal45nJ+9rS88cDam/44ALNcit6LPolCZuDoSech/6H 7P6rHB0M56WxpsgYJj9I1X+NRM55v5bOPrDyi0Y1HTo0MJDh/jzgvYfchgmzVcJk8zHc es/7H+sTrtmw6QsWLl4vaOdEUmtrxOLKuKU1TJ64IZu+evsx2l3iniynTtOmr6K6o9ou 2gx5V6NK1kTUBlDeL4kgUe8Np9ty76qs25D+QNOU6LFLn3LOGujxCZDxD9qKnAkwLMgk BLsQ== 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=bGMlJV9KCGi+BqqrtKEqCZlq+IvahtGbXbMzA2GPfv/nggOp26XRoU4Q54iT2CiYpn TkqRy7ioJO3WT7ukoHJaFy5PsAHTJ/oIN8vxbj7Z2h/h9iaQhKC5IE0oy1jD0i/rTI/k 8+lFJmhvzw/z2MMFNomiJ1hq8YTwM/DslkZ0atc16+oTlJgKkrRPlvs0z9DsiKRESdEX ED0E141aT+8ZgYfcwhCAelsOZYF690Y+vsEesuMyQrBIQzd0COcxq+gvbjTi4CLbBCDd 9MrS7wePiyOWrTNKXV/FanJplHkbVrg0y3JJSq7NlXd7qhW1/uOEWXsrCV4bAmOSlpMg ytYg== X-Gm-Message-State: AOJu0YwpzPP3Bwigy3mPVyg5oAqYNGewW83dg9AnjbLLNB8rBhCmiAl2 4kCVK1ctBEYjYei4BBM67Br1+vyUOXx+GpV91VPkJIp1QvDX5Tft91p2rYkBPSE= 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> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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);