Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3308088pxj; Mon, 24 May 2021 03:48:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6BZOrqB1z9X3QMRTmnuN9w8Q/C8U1An7jEvS7RpNNVat8H/3G9J0s/z1irKmjY05kyk6L X-Received: by 2002:a05:6e02:1204:: with SMTP id a4mr18109855ilq.158.1621853332791; Mon, 24 May 2021 03:48:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621853332; cv=none; d=google.com; s=arc-20160816; b=nv0TrKyCTOx3JW+1PJDQrUbRUr/rIior5C+Jt+wGYoh4b9CjfqyXwLj7RjJqbIL+W0 TEhLCwssoo8Pz9jujOzDveYFH8q+zIk6YVMCen5r9Udj2ZrPnYgNHsOMhnqr5NEEQJGE rn/v4Pg+4XY2K9Ctedfg3toKaNnMm7pMop1WKCdAhngpumtKL6iDeveES1ouR3lvQh3f 2xN7nmOE/qSH3eHF56W1+nEMkuumfzd+jfPR3ZVA2eymGvVSsWHStKGZYmd0n9XUTPUJ HdgoGH0qjQav7ckODVeTAG22/9FT0TySJ4K1/po2oGu+iDisIHfw2n8HnCHPMWvJpMWR /SfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=7wep5nFGssx+R7OcWL7h1w0q93K/rXO2DZOF6bIZCuc=; b=BMnaVH0Onpr6tO973RjYGEbrtIOAntQT6h8Q3aJmLT9XY2cbq5KcPxTu/ZB6Ij8XfP UaQQ6aR7kwiSV93z5neysP0KODNhrdp/DObI7GfdU0hBxkE5lMB1qZByY/2J6rjRAVqM tXG1XhGqqmUkVw8ZDULvOcMjb78+oXOR73o+iUZF8pT6Yr2/fIeshofr7585IAkESv4C kJJXw1BgSWe5vthrL3Vu1wrjWnk7cs3a18QplNy4FlQ6g/ZffvYViHANaYgwgOL0AnAH kdI2XrJJdw2xveJUrbSY0UH937KV+o7ibDwVPgyu9bMC5ly/beSjYCr/t63AS3aqNCjW BSjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k2si13374896ils.162.2021.05.24.03.48.40; Mon, 24 May 2021 03:48:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232563AbhEXKsd (ORCPT + 99 others); Mon, 24 May 2021 06:48:33 -0400 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]:56560 "EHLO out30-130.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232426AbhEXKsa (ORCPT ); Mon, 24 May 2021 06:48:30 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04395;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0UZw1ezY_1621853215; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UZw1ezY_1621853215) by smtp.aliyun-inc.com(127.0.0.1); Mon, 24 May 2021 18:47:01 +0800 From: Jiapeng Chong To: alexander.deucher@amd.com Cc: christian.koenig@amd.com, airlied@linux.ie, daniel@ffwll.ch, sumit.semwal@linaro.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, Jiapeng Chong Subject: [PATCH] drm/amdgpu: remove unreachable code Date: Mon, 24 May 2021 18:46:53 +0800 Message-Id: <1621853213-55876-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the function amdgpu_uvd_cs_msg(), every branch in the switch statement will have a return, so the code below the switch statement will not be executed. Eliminate the follow smatch warning: drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:845 amdgpu_uvd_cs_msg() warn: ignoring unreachable code. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c index 82f0542..375b346 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c @@ -842,8 +842,6 @@ static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx, DRM_ERROR("Illegal UVD message type (%d)!\n", msg_type); return -EINVAL; } - BUG(); - return -EINVAL; } /** -- 1.8.3.1