From patchwork Wed Feb 20 00:45:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 2165761 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 341DBDF24C for ; Wed, 20 Feb 2013 00:45:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933366Ab3BTAph (ORCPT ); Tue, 19 Feb 2013 19:45:37 -0500 Received: from mail-ia0-f182.google.com ([209.85.210.182]:35682 "EHLO mail-ia0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932691Ab3BTAph (ORCPT ); Tue, 19 Feb 2013 19:45:37 -0500 Received: by mail-ia0-f182.google.com with SMTP id k38so56219iah.41 for ; Tue, 19 Feb 2013 16:45:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding:x-gm-message-state; bh=lw9eJBx+qb88yXgD9OzlnolPj6eWixR4RLBhxEq0PVE=; b=o2H69JjVh43G898jZXuxEq5q5THGy64lS+h8mmcn3yWZ3L5EppAU3DNpkrzG51b0NV 2sehinzueivpwcTCq1hj0QXAIqEZ268OlGkYmDvyuPJ7MU6BNX6N6oK1eFEuz5B+LVyx KEJMLqY4vTIkO0GRvaVt95UQ8Ugykkpt0k/0fw4W3/B+IWyMjRz08dxX0dU0B+cvm0uA xJuGW2CG+kT49nW3CMSCbOYBAjGFAt5erdn/tEjVaIg5UgO/rZtQf6clfVO+RR8HJoCw +YE4YbQA/lJpuvH7+OkHH2DE8tCS2lDePTZP9iINd67RE7Q/oAQpljdHj+B+y/vYt164 G/Ag== X-Received: by 10.50.13.208 with SMTP id j16mr9893431igc.73.1361321136727; Tue, 19 Feb 2013 16:45:36 -0800 (PST) Received: from [172.22.22.4] (c-71-195-31-37.hsd1.mn.comcast.net. [71.195.31.37]) by mx.google.com with ESMTPS id dy5sm8321933igc.1.2013.02.19.16.45.35 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Feb 2013 16:45:35 -0800 (PST) Message-ID: <51241CAE.3020201@inktank.com> Date: Tue, 19 Feb 2013 18:45:34 -0600 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: ceph-devel Subject: [PATCH] ceph: eliminate sparse warnings in fs code X-Gm-Message-State: ALoCoQnsMZV0/oLugIxX/MFblP8Y5xpKsxo/M/wk6ZDNkPsI5TGrQpczNIQrPkIXyxFWd9ZjTB4R Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org Fix the causes for sparse warnings reported in the ceph file system code. Here there are only two (and they're sort of silly but they're easy to fix). This partially resolves: http://tracker.ceph.com/issues/4184 Reported-by: Fengguang Wu Signed-off-by: Alex Elder --- fs/ceph/xattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c index 2135817..9b6b2b6 100644 --- a/fs/ceph/xattr.c +++ b/fs/ceph/xattr.c @@ -213,7 +213,7 @@ static struct ceph_vxattr ceph_dir_vxattrs[] = { XATTR_NAME_CEPH(dir, rsubdirs), XATTR_NAME_CEPH(dir, rbytes), XATTR_NAME_CEPH(dir, rctime), - { 0 } /* Required table terminator */ + { .name = NULL, 0 } /* Required table terminator */ }; static size_t ceph_dir_vxattrs_name_size; /* total size of all names */ @@ -232,7 +232,7 @@ static struct ceph_vxattr ceph_file_vxattrs[] = { XATTR_LAYOUT_FIELD(file, layout, stripe_count), XATTR_LAYOUT_FIELD(file, layout, object_size), XATTR_LAYOUT_FIELD(file, layout, pool), - { 0 } /* Required table terminator */ + { .name = NULL, 0 } /* Required table terminator */ }; static size_t ceph_file_vxattrs_name_size; /* total size of all names */