From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gnuweeb.org (Postfix) with ESMTPS id 25AFF7ED79 for ; Tue, 22 Feb 2022 18:05:52 +0000 (UTC) Authentication-Results: gnuweeb.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=DaGQrBdS; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645553152; x=1677089152; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=piQGDMDsJoOcOi5IZY0eumjhkax7jn7pJa5ckyffOZs=; b=DaGQrBdS6U8fUoyhJIS/9UduVHiE+Eo1Bq5VQONcZgnnCaXcYqkTZfI9 WY2JW41jjTYsHaq/7eTbC0nk4SgXrPcSqDZ3LtkZmVUX+iDzdMwwYjOvq HRMURSrwY/W4jBHTTbucGdSv7gYR9mCh0EpUDx3La1DtJQSo1gPorWjT6 XCYQyb3EgpVGJq+OybqHc6rcAoB0gDw1DwLpcc5GQq7TqO7I5fEUxqrTo 5nbNRn8SAZb8MCG1nZsEf7yhVWKpH0QlGuOyZ8gtD5jVojI/Mrn3iFeEO NAKOLqefkBa9S/AUE6DhsIqucMHOY4x1HaaqMwWDppuG/MCW2aubOrs/2 g==; X-IronPort-AV: E=McAfee;i="6200,9189,10266"; a="338210056" X-IronPort-AV: E=Sophos;i="5.88,387,1635231600"; d="scan'208";a="338210056" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Feb 2022 10:05:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,387,1635231600"; d="scan'208";a="706704498" Received: from lkp-server01.sh.intel.com (HELO 788b1cd46f0d) ([10.239.97.150]) by orsmga005.jf.intel.com with ESMTP; 22 Feb 2022 10:05:48 -0800 Received: from kbuild by 788b1cd46f0d with local (Exim 4.92) (envelope-from ) id 1nMZXo-0000U9-6W; Tue, 22 Feb 2022 18:05:48 +0000 Date: Wed, 23 Feb 2022 02:04:46 +0800 From: kernel test robot To: John Stultz Cc: kbuild-all@lists.01.org, GNU/Weeb Mailing List , linux-kernel@vger.kernel.org Subject: [PATCH] ANDROID: dma-buf: system_heap: fix returnvar.cocci warnings Message-ID: <20220222180445.GA19085@31c17c0ba754> References: <202202230232.gcmck8F2-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202202230232.gcmck8F2-lkp@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: From: kernel test robot drivers/dma-buf/heaps/system_heap.c:312:5-8: Unneeded variable: "ret". Return "0" on line 321 Remove unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci Reported-by: kernel test robot Signed-off-by: kernel test robot --- tree: https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android12-5.4 head: 0d36c5d6308623c56e2e94aff13e820cdd676bbf commit: 44008f99d9ca0793e2562967e1da01fa74ee4a41 [4032/9999] ANDROID: dma-buf: system_heap: Add pagepool support to system heap :::::: branch date: 6 hours ago :::::: commit date: 1 year ago drivers/dma-buf/heaps/system_heap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/dma-buf/heaps/system_heap.c +++ b/drivers/dma-buf/heaps/system_heap.c @@ -309,7 +309,6 @@ static int system_heap_zero_buffer(struc struct sg_page_iter piter; struct page *p; void *vaddr; - int ret = 0; for_each_sgtable_page(sgt, &piter, 0) { p = sg_page_iter_page(&piter); @@ -318,7 +317,7 @@ static int system_heap_zero_buffer(struc kunmap_atomic(vaddr); } - return ret; + return 0; } static void system_heap_dma_buf_release(struct dma_buf *dmabuf)