From patchwork Tue Feb 6 20:09:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ladislav Michl X-Patchwork-Id: 10203959 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 668EC601A1 for ; Tue, 6 Feb 2018 20:09:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A6CC28D51 for ; Tue, 6 Feb 2018 20:09:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D7C628D54; Tue, 6 Feb 2018 20:09:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CACD828D51 for ; Tue, 6 Feb 2018 20:09:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752878AbeBFUJl (ORCPT ); Tue, 6 Feb 2018 15:09:41 -0500 Received: from eddie.linux-mips.org ([148.251.95.138]:47650 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752574AbeBFUJl (ORCPT ); Tue, 6 Feb 2018 15:09:41 -0500 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23992368AbeBFUJkSzCiO (ORCPT ); Tue, 6 Feb 2018 21:09:40 +0100 Date: Tue, 6 Feb 2018 21:09:39 +0100 From: Ladislav Michl To: linux-fbdev@vger.kernel.org Cc: Bartlomiej Zolnierkiewicz , Bernie Thompson Subject: [PATCH 2/2] video: udlfb: Use already defined BPP constant Message-ID: <20180206200939.GB10897@lenoch> References: <20180206200838.GA10897@lenoch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180206200838.GA10897@lenoch> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Replace const variable with already defined constant. Signed-off-by: Ladislav Michl --- drivers/video/fbdev/udlfb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c index 45081297efa5..7b53fefb4b94 100644 --- a/drivers/video/fbdev/udlfb.c +++ b/drivers/video/fbdev/udlfb.c @@ -428,7 +428,6 @@ static void dlfb_compress_hline( const uint16_t *pixel = *pixel_start_ptr; uint32_t dev_addr = *device_address_ptr; uint8_t *cmd = *command_buffer_ptr; - const int bpp = 2; while ((pixel_end > pixel) && (cmd_buffer_end - MIN_RLX_CMD_BYTES > cmd)) { @@ -453,9 +452,9 @@ static void dlfb_compress_hline( cmd_pixel_end = pixel + min(MAX_CMD_PIXELS + 1, min((int)(pixel_end - pixel), - (int)(cmd_buffer_end - cmd) / bpp)); + (int)(cmd_buffer_end - cmd) / BPP)); - prefetch_range((void *) pixel, (cmd_pixel_end - pixel) * bpp); + prefetch_range((void *) pixel, (cmd_pixel_end - pixel) * BPP); while (pixel < cmd_pixel_end) { const uint16_t * const repeating_pixel = pixel; @@ -490,7 +489,7 @@ static void dlfb_compress_hline( } *cmd_pixels_count_byte = (pixel - cmd_pixel_start) & 0xFF; - dev_addr += (pixel - cmd_pixel_start) * bpp; + dev_addr += (pixel - cmd_pixel_start) * BPP; } if (cmd_buffer_end <= MIN_RLX_CMD_BYTES + cmd) {