From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (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 E6C4E7EEF3 for ; Thu, 28 Mar 2024 12:12:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711627974; cv=none; b=IUiX+Uw/5Ekn6gMYAyt2HnyBaktUMZ0zBnDofzfYCvYeA1AYcpotf/Ckgd3NoHd0oCxo/EB+TMxsniQqKjBnytNM9FfP7/HM8zLOh7lcXtwzAP86xqpS+qkKKpFYNSsj3q0UNidzzMyjsQjqok5wEzGlSnd82RSsnGFPW6+ObCY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711627974; c=relaxed/simple; bh=URk7fibNLFgzKg25jKRBtY4kibQ99F3/DTCHeKbgi78=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=H3WsqBH95R/pB30qv8g3qzZ7U81be1urLp5ggzHLP9QQQz1Otu9FAUGg08BsuudAFzQB+d1WXlwBTz3+B7BlJRUWFej/sxg461wnPpYq7hd3ewgvwHaeFJNMhj4FaAxXjpTaR6eOefPwvUSG3Sb4Y7QmRdVZC1QWYaOtDRT0WxU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=GJDngFlO; arc=none smtp.client-ip=209.85.208.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GJDngFlO" Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2d68651e253so12378291fa.0 for ; Thu, 28 Mar 2024 05:12:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711627971; x=1712232771; darn=lists.linux.dev; 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=/pHbsx3RtRZlv3pDf9iCJ8YxxZWB5X7vBVRsbvu4oC4=; b=GJDngFlOSX7QGA/dG/g7i8tDpBrbYeY7uxt8iBItomRdmHTStlxapxSRErwPSHLciC nZcUWCUZxnxY7MAoPS8oys0fX2qjoOd2I7rkimYxHOosUqdEMCgy00lgOEjas+cleY7m utx8syj9zBkpVOdyyupHwav/ywUyyBSPrOczhZmlyuODcQTTZ5bd97wCYwdmZjEX8i+N kN55ugkDgRkGjp2G2w9jKyPuoTHeR2nSH1YN1SnJbbb5FINqxt3S2ys1i/kUDdbuSiK9 oEfXrEMjn94MoRy3oVH4tDi3oBQqy0E37sj9VhPsHKgRyPLLgofjc0qHV9wWFbH28Ezm m94w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711627971; x=1712232771; 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=/pHbsx3RtRZlv3pDf9iCJ8YxxZWB5X7vBVRsbvu4oC4=; b=aYOhNhXqpEt9bdv6ahVOQ5ca8yPVRHgM6KABWXRmVosL16plPUexf/A4oU5zyrv/j7 s2+xWyjDV1YDyOCTnNkDTMOXuBddwkgR/ZlznhDJC9DXGcZvX0yU4v4TB8WFbU3EE2DO 5k3sMSuz1Ge/wxfgKcum474yp3ER8br+53m3I7uXPH0esryial67979oOSFgWk+t3fig XuDONJSqpADlbOHnJPqMp6lZZin51NU45uXRLBgHP67pEtYjHC9a5em7kvC4JPbD5/GR wGDQzJliD+81akwuvW8NjdHejySgy4BJ7EchPOCyyXmiZiaGV6xPQFwojaY0J+d/igr+ +HKA== X-Gm-Message-State: AOJu0YypFuRAdiCR7TNUHTeTvpIvUeYVW6Ww0pcLyyyZBcdI5Qy6E466 mFMzbY0NyssBqB1ynUfLoWWBunrXrB92gT5uvQUMMV79/s7tQ1vU X-Google-Smtp-Source: AGHT+IGdaMYhdpddVfAxwiAOprPo8P0Hi3KDjALTqxK6436N8wfrHsCU3tjwnVQqr/iQ10Asu3PZmg== X-Received: by 2002:a2e:99cb:0:b0:2d4:9ac6:6d00 with SMTP id l11-20020a2e99cb000000b002d49ac66d00mr2061402ljj.36.1711627970818; Thu, 28 Mar 2024 05:12:50 -0700 (PDT) Received: from YOGA.local ([2a06:c701:736b:f200:125e:963c:4e4b:b7c5]) by smtp.gmail.com with ESMTPSA id bd11-20020a05600c1f0b00b00415460a63ebsm1416456wmb.29.2024.03.28.05.12.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 05:12:50 -0700 (PDT) From: Shahar Avidar To: gregkh@linuxfoundation.org, hverkuil-cisco@xs4all.nl, andriy.shevchenko@linux.intel.com, robh@kernel.org, felixkimbu1@gmail.com Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 1/5] staging: pi433: Rename struct pi433_device buffer field to tx_buffer. Date: Thu, 28 Mar 2024 14:12:39 +0200 Message-Id: <20240328121244.1244719-2-ikobh7@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240328121244.1244719-1-ikobh7@gmail.com> References: <20240328121244.1244719-1-ikobh7@gmail.com> Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Driver holds buffers in different structs, as does the HW. Using explicit names for buffers increases readability. Signed-off-by: Shahar Avidar --- drivers/staging/pi433/pi433_if.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c index 8c513ac62156..13b464ab7db8 100644 --- a/drivers/staging/pi433/pi433_if.c +++ b/drivers/staging/pi433/pi433_if.c @@ -90,7 +90,7 @@ struct pi433_device { struct task_struct *tx_task_struct; wait_queue_head_t tx_wait_queue; u8 free_in_fifo; - char buffer[MAX_MSG_SIZE]; + char tx_buffer[MAX_MSG_SIZE]; /* rx related values */ struct pi433_rx_cfg rx_cfg; @@ -613,8 +613,8 @@ static int pi433_tx_thread(void *data) if (tx_cfg.enable_address_byte == OPTION_ON) size++; - /* prime buffer */ - memset(device->buffer, 0, size); + /* prime tx_buffer */ + memset(device->tx_buffer, 0, size); position = 0; /* add length byte, if requested */ @@ -623,15 +623,15 @@ static int pi433_tx_thread(void *data) * according to spec, length byte itself must be * excluded from the length calculation */ - device->buffer[position++] = size - 1; + device->tx_buffer[position++] = size - 1; /* add adr byte, if requested */ if (tx_cfg.enable_address_byte == OPTION_ON) - device->buffer[position++] = tx_cfg.address_byte; + device->tx_buffer[position++] = tx_cfg.address_byte; /* finally get message data from fifo */ - retval = kfifo_out(&device->tx_fifo, &device->buffer[position], - sizeof(device->buffer) - position); + retval = kfifo_out(&device->tx_fifo, &device->tx_buffer[position], + sizeof(device->tx_buffer) - position); dev_dbg(device->dev, "read %d message byte(s) from fifo queue.\n", retval); @@ -715,7 +715,7 @@ static int pi433_tx_thread(void *data) device->free_in_fifo = 0; rf69_write_fifo(spi, - &device->buffer[position], + &device->tx_buffer[position], write_size); position += write_size; } else { @@ -723,7 +723,7 @@ static int pi433_tx_thread(void *data) device->free_in_fifo -= size; repetitions--; rf69_write_fifo(spi, - &device->buffer[position], + &device->tx_buffer[position], (size - position)); position = 0; /* reset for next repetition */ } base-commit: 20952655235dd9b1447829591774f1d8561f7c6a prerequisite-patch-id: 91943193af2fea74182be67fb583235a3fbeb77b prerequisite-patch-id: 2cad031ba6a0782a67ab1645ff034a8be65c2e76 prerequisite-patch-id: 1a852ed8f9d133aec7c651fd9007e59e39c55fb7 -- 2.34.1