From patchwork Sun Dec 6 19:02:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 11954347 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18500C4361B for ; Sun, 6 Dec 2020 19:03:25 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D4934230F9 for ; Sun, 6 Dec 2020 19:03:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D4934230F9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CD4E26E4FB; Sun, 6 Dec 2020 19:03:22 +0000 (UTC) Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id C51036E4FB for ; Sun, 6 Dec 2020 19:03:20 +0000 (UTC) Received: by mail-lj1-x242.google.com with SMTP id q8so12622010ljc.12 for ; Sun, 06 Dec 2020 11:03:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GScDic0SzMOywiRur8mCpGJMaQJv67n1BqEnfhPYONM=; b=QMkRY6iR3O19IMJtlN+m8w86Axp8od1Z+Rd3idr23N4rt0HINNoZzNcNrb4mNMjjZu LtfD2LRDhh3DEyGEelRH+81cqqoQz6u2EGfaFSAaEV4zQVEQ7bdTSmG3CvppgGL4RgWj c7Oi5iOg63ZkdJPZC4t0TXvm2CwtDUzgfeudGj2JxAKG2JJV00RNILCmcFohVVoB5GRw Lc5MCgm2iKKHIevinvY7+ABLUGJ+6Wgt5evU5xN9dWXBW3BVnKhDDYg5UYkpaodDe+J6 ppuuuQbWocz5KRVehMqi41+JufRzKHoQeL7FAeA3rqybqK6fKDkrVw+NwXOkDRqusUpM lMjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=GScDic0SzMOywiRur8mCpGJMaQJv67n1BqEnfhPYONM=; b=G6RodubVYOBpZ6vq5+oHzvZQs+ArRgQafW1GNMBfEHvzlB8Tu0umg/apXeZyGsvKZb /u90nq15xv0xvxSX7V3t9+QW/xGdnbeK1MfFxPGTGGc+hrTet/iz8vNS8+ydvxd7tCVm z3x9mWpHIgUykSuCCV22cNRjBn9aAn0YgYofCJqZRTSwHjWIb93IcllyNDxaSwJUvu7F Wwj5KCHddp/sMr1z6KpbD6Ly3pHv5uzIr/upsdEbS8Qe/M5EvZWieIW10/qH4z5xnN2N +lGg5vWhf3NaxR7Jk/e160WREnly64SSSbCrDXtsmuBZ5WOaBZcNJolTt1K3fTR7sD/1 g3UA== X-Gm-Message-State: AOAM530uF3rcm7NnoZvebFIS7jUPfwJC2RB19K4AE8tVaO5SFsF89ADM sou9yRFXbBDofxkZ/sUtFjE= X-Google-Smtp-Source: ABdhPJxrMN/xtNgSlDAS8lye01CuFJ2naATPUBdhH/2vk8CwJU1fz9TzgghOkMOTq4Zk9C0n+Dp+gA== X-Received: by 2002:a2e:b0d4:: with SMTP id g20mr7193569ljl.281.1607281399117; Sun, 06 Dec 2020 11:03:19 -0800 (PST) Received: from saturn.localdomain ([2a00:fd00:8060:1c00:c1c3:bbc6:3ac5:732d]) by smtp.gmail.com with ESMTPSA id v28sm2483865ljv.29.2020.12.06.11.03.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Dec 2020 11:03:18 -0800 (PST) From: Sam Ravnborg To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Lee Jones Subject: [PATCH v3 13/13] video: fbdev: sis: Drop useless call to SiS_GetResInfo() Date: Sun, 6 Dec 2020 20:02:47 +0100 Message-Id: <20201206190247.1861316-14-sam@ravnborg.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201206190247.1861316-1-sam@ravnborg.org> References: <20201206190247.1861316-1-sam@ravnborg.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rich Felker , Kuninori Morimoto , Peter Zijlstra , Daniel Vetter , Gustavo A R Silva , Andrzej Hajda , Peter Jones , Sam Ravnborg , Geert Uytterhoeven , Michael Ellerman , Thomas Zimmermann , Arnd Bergmann , Bartlomiej Zolnierkiewicz , Thomas Winischhofer , linux-arm-kernel@lists.infradead.org, Qilong Zhang , Randy Dunlap , Douglas Anderson , Tony Prisk , Thierry Reding , Alexander Klimov , Colin Ian King , Andrew Morton , Mike Rapoport Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Coverity reported: Useless call (USELESS_CALL) side_effect_free: Calling SiS_GetResInfo(SiS_Pr, ModeNo, ModeIdIndex) is only useful for its return value, which is ignored. And this is correct - so drop the call. Signed-off-by: Sam Ravnborg Reported-by: Colin Ian King Addresses-Coverity: ("Useless call") Cc: Colin Ian King Cc: Thomas Winischhofer Acked-by: Thomas Zimmermann --- drivers/video/fbdev/sis/init.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/fbdev/sis/init.c b/drivers/video/fbdev/sis/init.c index b77ea1a8825a..b568c646a76c 100644 --- a/drivers/video/fbdev/sis/init.c +++ b/drivers/video/fbdev/sis/init.c @@ -2659,7 +2659,6 @@ SiS_SetCRT1ModeRegs(struct SiS_Private *SiS_Pr, unsigned short ModeNo, if(SiS_Pr->UseCustomMode) { infoflag = SiS_Pr->CInfoFlag; } else { - SiS_GetResInfo(SiS_Pr, ModeNo, ModeIdIndex); if(ModeNo > 0x13) { infoflag = SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag; }