Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1494618lqs; Sat, 15 Jun 2024 11:05:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVSWSYOnRZVOtHaFEV9nBGqJkA8wohN3WxJ9bg4oFjeYF4fKLZ8beqxcAht5haLJfW6p4w8gMoKDtgkXmNZLIqied/P8OWfhjHoZxTBJQ== X-Google-Smtp-Source: AGHT+IG/U/sz8gQWOfkUiUFnKcWrRyMRjUI5Elpav63opGyypw5SBI8hWoM6momCYes3/gF6s2MH X-Received: by 2002:a17:90a:d3ca:b0:2c4:f32c:6b with SMTP id 98e67ed59e1d1-2c4f32c012fmr6056534a91.19.1718474730346; Sat, 15 Jun 2024 11:05:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718474730; cv=pass; d=google.com; s=arc-20160816; b=Xa0OLwutimbEc08cQMDJcNERIXQIvIcWeks+YzsjPIU9ynL0iUlm1er2G7tDxhD8DI l1Fn2+CGswM7tkny4nOaqjTetA9PIYMdzh+fsYOBngl28Jnv2OsxCeM6XMdy7eNSiLFu fatAJudEI1lrwW0US1xBSoRn7didtAb3SLKbQzA4q8bbi6nKZjtsaLAI8Ew6s7L/1M0l gwFu28W5g3piZKfKXDkl1K3ujvDpkPSEpSR1fWOzGtCzRZTogb7jzJGXVpDt4RwBv8xM Sq4nSjqBYY0BTwe+2dZ1sRzurXPs0bjzO4aIWQs44RrZkpuQU8iZiqSqT9Keq6bSsEBi gVbQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:dkim-signature:date; bh=WcfY5CiTtCeV7ulN7IcXp0SqaGIOpdKgvfAdsg4ZkT4=; fh=3kvh9H79FbRWwsz31e5LOhTZl7n/fltiSGZR+m6MbEM=; b=JC/8Cm5CAYbCeiLQXlkSo3pujYafY4S2lgXa7b8B3aWmHHGCeBAPBP3XOE/n4R6ZG7 yE5XWppYPFskX1YtYP2rXTIFly0yFozdwvVF0flI8L4UP0PoNLLFps+J9yGdrs+JDkhg YcWufqNpswJ0oDx3wVjh0IPzFpFfLC91lgqHKsrw8z6LMhVahSVizRGTJ0UTGBgYHVer 5TV4NrNIwgJ/IIG8eBrClCwVdiVUH7Gd/tzBNuGxpdsJqWABZq8sQ8VenfObH0egPUon nKPCMUYcgrYJQXA8Xn6lfqe/BwM0GdtUTbb5x4WBHI/oX6fTbLkR+rsuAztVrAjuf+K5 +CbQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=FdqXNdvX; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-215976-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215976-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c4a75dea50si8255114a91.5.2024.06.15.11.05.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jun 2024 11:05:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215976-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=FdqXNdvX; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-215976-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215976-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C6BCAB21332 for ; Sat, 15 Jun 2024 18:05:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6FC0C53368; Sat, 15 Jun 2024 18:05:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="FdqXNdvX"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="GNkJ8nkR" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4422F5A4FD for ; Sat, 15 Jun 2024 18:05:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718474718; cv=none; b=kPadsrApanJbSj3t192qMdeTK601mH0bYAYMk/lMg3wz+b56O/rhi+/VaemZQZ7zV/ClgC1SOIABxYrYJDPwZXLqmFERgdMtbAKE4egl+zDDhPdupDeyxCpdHH2tyomcPXy7mXKx3N6GNwkCr/0hAc9p77pRrDXiKi6zi80lYZs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718474718; c=relaxed/simple; bh=AerkokwDAt1HXVNRUDovu2QK0YFTI7Ng3dmM04onMvI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=C5fPp4VAj9nmu99LUoxtqbN3Vb1BzJ2zQRye5Lji45Cu7grWbb3XGIhhL6VF98ZQRvELIy75hYABYnguAv6bU4eWjASMbHLAwuraGPcfLEjlFMa+YMz4aKdgfKso2dP3xvYXMPS+Hm/IjsbKFD9Pa9YeCU9fDjOISuXkNLe7nY0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=FdqXNdvX; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=GNkJ8nkR; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Sat, 15 Jun 2024 20:05:01 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1718474708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WcfY5CiTtCeV7ulN7IcXp0SqaGIOpdKgvfAdsg4ZkT4=; b=FdqXNdvXEGSC8BJ4edUGmw/eo633+o071Z5spOJhCYOhPLhPqz5m96nXoQ1+TYw/GU2hd1 qOLj+MgQct1hHJ8JGEcUgPVcIQibG3/1ivha2eaqTWPvcTItAgyl67XjjGKUWTBew8V8I9 8Q9qijqpukMTaiGati8XeLwcHnM3chE+Xhi3ZMAeh01gKPqxWd9McSFiK0x/+kuPMri0Dy L0hMvmLp8x/Pl4v6EQKfuOc0FrhhB8pzawkt/+F8xFwT+enjEN7ZugUbb0JBhvCloYPpvf mdnjqHQlLAx6PTPEAdPcJB+3IWFREYyDcSdyGcQWweySwfoU5B3kfT5Y981oag== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1718474708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WcfY5CiTtCeV7ulN7IcXp0SqaGIOpdKgvfAdsg4ZkT4=; b=GNkJ8nkRi+Vt+VUwztZHRaR+5I6Zyl5tI4sYNtTfa0+ju5n2TEiqWYcQNVFqrbAeHTBJYx 0/L3HbmjK26l/ECw== From: Nam Cao To: Abhinav Jain Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, skhan@linuxfoundation.org, javier.carrasco.cruz@gmail.com Subject: Re: [PATCH] staging: rtl8723bs: Align address to 4-byte boundary Message-ID: <20240615180501.KINZFINu@linutronix.de> References: <20240614224256.43131-1-jain.abhinav177@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240614224256.43131-1-jain.abhinav177@gmail.com> On Fri, Jun 14, 2024 at 10:42:56PM +0000, Abhinav Jain wrote: > Add address alignment in sdio_local_read, _sdio_local_read & > sdio_local_write functions as per the TODO. > > Signed-off-by: Abhinav Jain > --- > drivers/staging/rtl8723bs/hal/sdio_ops.c | 12 +++--------- > 1 file changed, 3 insertions(+), 9 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c > index 107f427ee4aa..caee2d2043b3 100644 > --- a/drivers/staging/rtl8723bs/hal/sdio_ops.c > +++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c > @@ -478,9 +478,6 @@ void sdio_set_intf_ops(struct adapter *adapter, struct _io_ops *ops) > ops->_write_port = &sdio_write_port; > } > > -/* > - * Todo: align address to 4 bytes. > - */ > static s32 _sdio_local_read( > struct adapter *adapter, > u32 addr, > @@ -494,6 +491,7 @@ static s32 _sdio_local_read( > u8 *tmpbuf; > u32 n; > > + addr = addr & ~3; > intfhdl = &adapter->iopriv.intf; > > hal_sdio_get_cmd_addr_8723b(adapter, SDIO_LOCAL_DEVICE_ID, addr, &addr); > @@ -516,9 +514,6 @@ static s32 _sdio_local_read( > return err; > } > > -/* > - * Todo: align address to 4 bytes. > - */ > s32 sdio_local_read( > struct adapter *adapter, > u32 addr, > @@ -532,6 +527,7 @@ s32 sdio_local_read( > u8 *tmpbuf; > u32 n; > > + addr = addr & ~3; > intfhdl = &adapter->iopriv.intf; > > hal_sdio_get_cmd_addr_8723b(adapter, SDIO_LOCAL_DEVICE_ID, addr, &addr); > @@ -557,9 +553,6 @@ s32 sdio_local_read( > return err; > } > > -/* > - * Todo: align address to 4 bytes. > - */ > s32 sdio_local_write( > struct adapter *adapter, > u32 addr, > @@ -572,6 +565,7 @@ s32 sdio_local_write( > s32 err; > u8 *tmpbuf; > > + addr = addr & ~3; > intfhdl = &adapter->iopriv.intf; > > hal_sdio_get_cmd_addr_8723b(adapter, SDIO_LOCAL_DEVICE_ID, addr, &addr); Tthese functions are never called with "addr" that is not 4-byte-aligned. So I don't think this patch is what the Todo notes meant. Best regards, Nam