From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 34AAC44D6B2 for ; Wed, 17 Jun 2026 14:37:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781707034; cv=none; b=mSDrn4gP40svLN5tcceNwHMk1KbothNN5i89c31gdH6vlVbvDCB2q8rw4U41jQz8zKnAS7yNOuiyaYrckiXgiXMy09ba/xgECwINeT3kfKDJHzCNRUgwlfBQLFnz/eHh9sWnTrZHHIErZwccHZEbqRIEXMmhKxvpDFohR7MO6sA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781707034; c=relaxed/simple; bh=4gMx/gFP3ezYWwhAOqAB1Kje7kj3CrAvjE+qT8YPYSg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=G7tabtnyZv2fj5jxyMvCU9ZII5FRJcD887Uszq4uz2mYeVSktFwlXLmHbpnUTMtNo4dlK/CUfHpb7bgA2sFWQYkaU0G0sqtzHIZMCOME5Ne14jhCNE7ebUQkPSBkG2V00CZT0ceg31bTstfRiy0XOVs21C0UDbNQ+VgViazybg4= 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=JvxjNUEp; arc=none smtp.client-ip=209.85.128.48 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="JvxjNUEp" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-49230a567a9so11084345e9.0 for ; Wed, 17 Jun 2026 07:37:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781707032; x=1782311832; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=f/U3pg1qQqmyIDqzsXJB2VsL6PWowCqDwJ+7vnlJ6Ro=; b=JvxjNUEpQyON0HdGKHJGLgwjmT9fh5GwEFPiChFtSUFGjpxeFVZ993a/7nrjJykJiQ 38Nmb43EVFMRLoIptgWG3Cs/4gOy/UDf6l9OQoW8qnkL6KH3k91at26xZvh+kk6FbMKB Ss8YgxC8CPe92kEfvVwiC9FzLmlFgzH1rvvFnpt/DQEbf7+PFlAiKFyLvtNBN/qzyN2L v/aZBQBel2q6TmcTOpJ0LF71cBffcDOoeOD1pgJ+6RmXsW4zcxtyiLhXHRAsFS9fqUqa BT97c7WTSxgrH4XcO8Ay4AO4aN5m8u7dETIhxwD42T1F/3/fFWeeUBcRNW7FLzzy7cqt sxrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781707032; x=1782311832; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=f/U3pg1qQqmyIDqzsXJB2VsL6PWowCqDwJ+7vnlJ6Ro=; b=fFtPW9YnMWnUaxqunnOldfUuJz48Q51tHf2VW5GabAjh/IsiYd4likXJRQkCelo2Bf GD29/VLSwCXp/aQhmRNEty63SLJOjeCea6I7RBanPNeUr8EX2JTFB1aRfuy6/tCN8ZZO WIb0g90/oSVsVVEu39GjaD/tpoPOG4tPUcXCANPa2EvIDvVfG4cJ7n1VVelKKE8UtmMZ 1BVMTNYOeYChxEZFs0yzgZvcJvr9/1F/UdifauuwWwBqPZWOR3ypDIkIh8U/GJemuLis qFiiDjC8eZhY/uE8Jhc+Sb6uhk0tbZ261Q9aU0BsVbmrfgxhG9adkDASBKpZAjRaNl55 aRRQ== X-Forwarded-Encrypted: i=1; AFNElJ9GMxY0kk7SK0IL20BSreuTATi6tfhmV3FxIo9RN/F6G3mMBH5kJG6zOcZacxgzOUIHZjzE7emkXh/4mcs=@vger.kernel.org X-Gm-Message-State: AOJu0Yw64O74wrrIsHagQ0+G0tc5aP3pJmzfPbTLIqLpSAy0eFR4tuj5 FQ+wEWH5s/KC6zvU+q1cdloOBEkJSc2apee7mOSgtjGiR/IL4To8tJOx X-Gm-Gg: Acq92OFsZmbdBhBL0iWyK/RBbgzIf3pIt7GoiWAB+9ANLPLNqamSVifiQFRGwj63g0/ OJOPNPw2iiiHRyMQdBs4o8ghMN0MtY+CLVApNLXW0eoMY+4BgT12QLV/FAcKUUrx7cWzNc5m++5 a9QW+1R2NKjyXZEkKWlCOiMkqY984upjFOv6FmZ5bGCXVTLZmYrFHUNS6wR5XWs7KjU1FeUoUUx vfo8hrnrsUMl/E9RgUiT3vEA5cFrIqiVYLAdo4P+I8avT7sAadSQw5n5N+xb6fr5jEsivjgJnzQ Vf7yXxbYq73IhMVX1Oj84iJTyEx0DRiF7A4DY3rg4Yx0GwVE9xmk3drBt9eGSw8GjPrkxZ6Vrl5 isFfjkyiz67VNae+liWhu8zSw6FMQLOG+a2Vrx0K+ddQhsgVgKRVkP5H5gEN/hEcA9n2KGujSNW HH5uQRqF3p X-Received: by 2002:a05:600c:c3cf:20b0:490:bf1a:ed04 with SMTP id 5b1f17b1804b1-492333ea3f3mr55873575e9.1.1781707031467; Wed, 17 Jun 2026 07:37:11 -0700 (PDT) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49230a96b47sm138337045e9.13.2026.06.17.07.37.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2026 07:37:10 -0700 (PDT) Date: Wed, 17 Jun 2026 16:21:34 +0300 From: Dan Carpenter To: Devansh Soni Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4] staging: rtl8723bs: remove redundant rsp_allocated_buf Message-ID: References: <20260617123853.63022-1-devanshsoni874@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: <20260617123853.63022-1-devanshsoni874@gmail.com> On Wed, Jun 17, 2026 at 06:08:53PM +0530, Devansh Soni wrote: > The original code allocated extra memory and manually aligned the > rsp_buf pointer to a 4-byte boundary, however kzalloc() guarantees a > minimum of 8-byte alignment so this was unnecessary. > > Also, because the pointer was shifted, the original pointer had to be > stored in rsp_allocated_buf just so it could be passed to kfree() later. > > Remove the redundant alignment math, remove the extra 4 bytes of padding > from kzalloc() call, and assign memory directly to rsp_buf. > > This allows us to remove the rsp_allocated_buf variable from cmd_priv > struct. > > Suggested-by: Dan Carpenter > Signed-off-by: Devansh Soni > --- > Changes in v4: > - Dropped PTR_ALIGN() entirely as kzalloc() 8-byte alignment is sufficient. > - Removed the +4 byte padding from kzalloc(). > - Completely removed the rsp_allocated_buf tracking variable and updated kfree(). Thanks! Reviewed-by: Dan Carpenter regards, dan carpenter