From patchwork Fri Oct 26 19:24:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shayenne Moura X-Patchwork-Id: 10657757 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EAD4017DE for ; Fri, 26 Oct 2018 19:25:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DBB9D286F9 for ; Fri, 26 Oct 2018 19:25:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CFADA2BEEF; Fri, 26 Oct 2018 19:25:09 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0A3642CB8D for ; Fri, 26 Oct 2018 19:25:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BDBBB6E53C; Fri, 26 Oct 2018 19:25:05 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3B0226E53C for ; Fri, 26 Oct 2018 19:25:04 +0000 (UTC) Received: by mail-qk1-x743.google.com with SMTP id v68-v6so1374361qka.2 for ; Fri, 26 Oct 2018 12:25:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=oG0AzlyfGvjB8pHJ3pxUdHABNxHH12Ws4GlnVqXoYBM=; b=EgGfNVvS1P4F1bL7v90qsZdN+uwMmn8NzQd62wTRALY++w+xUwat2HO070dk0gsJml 0eo1iOxdwn798c3bB9JJF+Nb2FMhw2Q//xgfa+x1MADpB6Rr7iIKicYXVdrIPbzm5xPs efws5Y1dRxvedsN072+1Ja3OTvsl7Ws1dVLmqb7jZVMHMFwquGFy0oukvofS9tIY4Yyo Gnu05yJ0OTYZ0A3Bgwzj9UAIXUvONoKcTDL6Ef3eMEK/9pbUj4QTivpuM/gsuu7R2kwr 0Weq/o3fIvPPeIfFOCmJC9ZwvzGpOLCeRLj12RYdKba7LC2cyelxNsIZqbJ65YInAaUY gm8Q== X-Gm-Message-State: AGRZ1gKTc7dUXLFMMJjFmx5Drg55ArlIizZa2j7QDi0RpGLctUogB8g1 rHqqpzRQYpFeY/IXL3NgQZQ= X-Google-Smtp-Source: AJdET5e/a+P/YAVjVA5hPQoWWhlMs8VAL4faMnzQMs57K1/qyTlhyrjSkwADiqx7A+X5laisg6Xh1Q== X-Received: by 2002:a37:5003:: with SMTP id e3-v6mr4397179qkb.102.1540581903262; Fri, 26 Oct 2018 12:25:03 -0700 (PDT) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id c79-v6sm11289917qka.83.2018.10.26.12.25.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Oct 2018 12:25:02 -0700 (PDT) Date: Fri, 26 Oct 2018 16:24:58 -0300 From: Shayenne da Luz Moura To: Dave Airlie , Gerd Hoffmann , David Airlie Subject: [PATCH 6/6] drm/qxl: Use 'unsigned int' instead of 'bool' Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: outreachy-kernel@googlegroups.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Use 'unsigned int' with bitfield instead of 'bool' to avoid alignment issues and remove checkpatch.pl check: CHECK: Avoid using bool structure members because of possible alignment issues Signed-off-by: Shayenne da Luz Moura --- drivers/gpu/drm/qxl/qxl_drv.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h index d78bcb95df3e..14d3fa855708 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.h +++ b/drivers/gpu/drm/qxl/qxl_drv.h @@ -88,10 +88,10 @@ struct qxl_bo { /* Constant after initialization */ struct drm_gem_object gem_base; - bool is_primary; /* is this now a primary surface */ - bool is_dumb; + unsigned int is_primary:1; /* is this now a primary surface */ + unsigned int is_dumb:1; struct qxl_bo *shadow; - bool hw_surf_alloc; + unsigned int hw_surf_alloc:1; struct qxl_surface surf; uint32_t surface_id; struct qxl_release *surf_create; @@ -128,7 +128,7 @@ struct qxl_output { struct qxl_mman { struct ttm_bo_global_ref bo_global_ref; struct drm_global_reference mem_global_ref; - bool mem_global_referenced; + unsigned int mem_global_referenced:1; struct ttm_bo_device bdev; }; @@ -229,7 +229,7 @@ struct qxl_device { struct qxl_ram_header *ram_header; - bool primary_created; + unsigned int primary_created:1; struct qxl_memslot *mem_slots; uint8_t n_mem_slots;