From patchwork Thu Nov 15 03:43:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 12851 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id DBB3523E12 for ; Thu, 15 Nov 2012 03:49:35 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 8DB86A18229 for ; Thu, 15 Nov 2012 03:49:35 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so1648794iej.11 for ; Wed, 14 Nov 2012 19:49:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=aaOXwCc0yVj4KtxCBgA5h8gyvHQltQTYAksJxPmblKY=; b=AKs/+lVQ7saYwkd1qtLIKsHHJ7e1i+ugBNSL3yrKkugCKlp74ofVlzaJvq3wd+cPez VX8V3HKbqKYCE4EklAzh54dgT8BBD6YoCLKNsdBpi0xbe2VVWqrtbzlz3YxZyIoLY9nX fhclwYdv9oY2RGuYiQ/kDq6PhX/ASiTxAr2eQBMyEa2n+pMh18YAaXbNF8hpeKCnc11n /xDh+/bmPRacOrF94MU+9oaMb8I6hh3L3/1AMlXusNtB72MHKakRQFOzEX60zg/0DUZV O6Fk3HgmoH+IJJPWe51hNuwzDfse3ViojX/xrhF+cCJtSXNUYxcHfyp/9cFWErFTXedP Qczw== Received: by 10.50.161.169 with SMTP id xt9mr1335311igb.62.1352951375264; Wed, 14 Nov 2012 19:49:35 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp766012igt; Wed, 14 Nov 2012 19:49:34 -0800 (PST) Received: by 10.66.85.66 with SMTP id f2mr3911502paz.56.1352951374807; Wed, 14 Nov 2012 19:49:34 -0800 (PST) Received: from mail-da0-f44.google.com (mail-da0-f44.google.com [209.85.210.44]) by mx.google.com with ESMTPS id uq10si20883369pbc.77.2012.11.14.19.49.34 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 14 Nov 2012 19:49:34 -0800 (PST) Received-SPF: neutral (google.com: 209.85.210.44 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.210.44; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.44 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-da0-f44.google.com with SMTP id h15so541089dan.17 for ; Wed, 14 Nov 2012 19:49:34 -0800 (PST) Received: by 10.68.232.71 with SMTP id tm7mr524368pbc.118.1352951374546; Wed, 14 Nov 2012 19:49:34 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id jw10sm8782970pbb.20.2012.11.14.19.49.31 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 14 Nov 2012 19:49:34 -0800 (PST) From: Sachin Kamat To: dri-devel@lists.freedesktop.org Cc: airlied@linux.ie, airlied@gmail.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 3/3] drm/drm_fb_helper: Remove unnecessary braces Date: Thu, 15 Nov 2012 09:13:30 +0530 Message-Id: <1352951010-25393-4-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1352951010-25393-1-git-send-email-sachin.kamat@linaro.org> References: <1352951010-25393-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQkOysjXTLEtTiwVK3MkI2SpI6k+mWCsqxwuNSNbP9p2yWNZ5IW5xnE3TnW7lS1nL/Pt2uil Remove unnecessary braces to silence the following type of checkpatch warnings: WARNING: braces {} are not necessary for single statement blocks WARNING: braces {} are not necessary for any arm of this statement Signed-off-by: Sachin Kamat --- drivers/gpu/drm/drm_fb_helper.c | 23 ++++++++++------------- 1 files changed, 10 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 07cba5a..8c2de02 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -732,9 +732,9 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper, /* if driver picks 8 or 16 by default use that for both depth/bpp */ - if (preferred_bpp != sizes.surface_bpp) { + if (preferred_bpp != sizes.surface_bpp) sizes.surface_depth = sizes.surface_bpp = preferred_bpp; - } + /* first up get a count of crtcs now in use and new min/maxes width/heights */ for (i = 0; i < fb_helper->connector_count; i++) { struct drm_fb_helper_connector *fb_helper_conn = fb_helper->connector_info[i]; @@ -802,15 +802,13 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper, info = fb_helper->fbdev; /* set the fb pointer */ - for (i = 0; i < fb_helper->crtc_count; i++) { + for (i = 0; i < fb_helper->crtc_count; i++) fb_helper->crtc_info[i].mode_set.fb = fb_helper->fb; - } if (new_fb) { info->var.pixclock = 0; - if (register_framebuffer(info) < 0) { + if (register_framebuffer(info) < 0) return -EINVAL; - } dev_info(fb_helper->dev->dev, "fb%d: %s frame buffer device\n", info->node, info->fix.id); @@ -1010,11 +1008,11 @@ static bool drm_connector_enabled(struct drm_connector *connector, bool strict) { bool enable; - if (strict) { + if (strict) enable = connector->status == connector_status_connected; - } else { + else enable = connector->status != connector_status_disconnected; - } + return enable; } @@ -1199,9 +1197,8 @@ static int drm_pick_crtcs(struct drm_fb_helper *fb_helper, for (c = 0; c < fb_helper->crtc_count; c++) { crtc = &fb_helper->crtc_info[c]; - if ((encoder->possible_crtcs & (1 << c)) == 0) { + if ((encoder->possible_crtcs & (1 << c)) == 0) continue; - } for (o = 0; o < n; o++) if (best_crtcs[o] == crtc) @@ -1327,9 +1324,9 @@ bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel) /* * we shouldn't end up with no modes here. */ - if (count == 0) { + if (count == 0) dev_info(fb_helper->dev->dev, "No connectors reported connected with modes\n"); - } + drm_setup_crtcs(fb_helper); return drm_fb_helper_single_fb_probe(fb_helper, bpp_sel);