Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4052677imu; Mon, 28 Jan 2019 16:17:53 -0800 (PST) X-Google-Smtp-Source: ALg8bN5Rxm/Xw+/DKmSkf0VQcITEQmE9Hdm4NkFIFTlmHlYiCmVyp9S5JxUvsAdcymbqQIeQuRuh X-Received: by 2002:a63:d655:: with SMTP id d21mr21749745pgj.280.1548721073647; Mon, 28 Jan 2019 16:17:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548721073; cv=none; d=google.com; s=arc-20160816; b=AwTiQhRSscau6h8GO7utxxg0x6U6bXLjcMdL0uxtjkGxnFsgRiBQUYkFkpc0fbprYr jfeg64A9FLdA3s13ywbPKY1FUdUqTIYAvVCFHgdePOCEIANosB+8ZZOFnIOijM1YJf+a D1m7SBBpKqz8fec4L8F5e+LVASspvVaG6+MdQEEbC2XBoFsBYT6EwPOMiDxtTbr4dxY4 rdXJubl/+FFtql2Wu0XlBmmSABglExi0cr6jht5DjLMTcy/aXLmFFan/TGtq6AouR25O arKz+vOvTVvb7PBSbQnIpug5iL2o8EIwBdpOSKPtfMwr7IyRT8HR01HFMlXgJMA6f6G/ aacA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:subject:cc:to :from:date:dkim-signature; bh=zE2tmDyLSExMK4edA/36xJgSgC3/BobbiDFR2TmYBac=; b=LFmBRHM6zlTPEEEpiVozSuPqHL5KInXv2LgOG9GE0cbweroJZ0MKqWo/z8VKuSo31T n908hdPBpnywHA0iYvJL/fc4nvAAuYEICDuUj84g9EI9CowJB1xQf93qxQxgsPLJc4rw O2tMBwcBv0yUeixgEcy2t+gTQ145oeqmXdjapk6IHBEdz0IfMRZkGfpBITjdolA8r5gE Q8asWsFJUhfB+8pOfm/XtblMsmlcS7o6I636ndqmdOz+nPwHm6A0lHvTLKP8ayx9LAoD VeR5iEWPRDL2TxM2wyxxD0BGlo3zKEleqs5NP9PfOmHLmo0gYUn/fSx1MH5qGGE43vfY QjYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=KZPQwyGW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w6si1835451plp.429.2019.01.28.16.17.37; Mon, 28 Jan 2019 16:17:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=KZPQwyGW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726993AbfA2ARJ (ORCPT + 99 others); Mon, 28 Jan 2019 19:17:09 -0500 Received: from ozlabs.org ([203.11.71.1]:53253 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726713AbfA2ARJ (ORCPT ); Mon, 28 Jan 2019 19:17:09 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 43pRrg0YV7z9s9h; Tue, 29 Jan 2019 11:17:07 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1548721027; bh=12tDJhhlFsbni6XuUy+fHTKvZjXFPDl/WfDiVTL9ptg=; h=Date:From:To:Cc:Subject:From; b=KZPQwyGWp/BHxuq1ak/7sykoiKdBVZ44Amn7dW2au5fAESlstXOoHl3caWONvwswh R3vxu/bUlhmlNM6wk+zYohfXkjFqNwPAl7wPcxm1f7m7Pf6dDGOzJbTC4O9gnskMmC fkLNsH17DFFx8CD/7lh6gZ0GmPmnGz3e6RDU5CYV48w1H5t5JTPvD3niJJN20RrkuK 7BJrSSV8uR3q1uxGVG6JkSkX++F1ZDv0vTkeSwIf6hLiIbBjXapOm8K9yltRWjbM2g 8Bf+Ljn8sNgpA7hcT6lTgCF5L0SNGC8Vmn6BWNHe03vwtwwVVv6UkalDS25F//hF04 RVsa1jQAhygjQ== Date: Tue, 29 Jan 2019 11:17:00 +1100 From: Stephen Rothwell To: Brian Norris Cc: Linux Next Mailing List , Linux Kernel Mailing List , Boris Brezillon , Miquel Raynal Subject: linux-next: manual merge of the mtd tree with Linus' tree Message-ID: <20190129111700.7d50e369@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/V3DFixBTCDCpDgE5gzqtXFn"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/V3DFixBTCDCpDgE5gzqtXFn Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi all, Today's linux-next merge of the mtd tree got a conflict in: drivers/mtd/mtdpart.c between commit: 2b6f0090a333 ("mtd: Check add_mtd_device() ret code") from Linus' tree and commit: 2c24c9af0f38 ("mtd: rework partitions handling") from the mtd tree. I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. --=20 Cheers, Stephen Rothwell diff --cc drivers/mtd/mtdpart.c index 60104e1079c5,089095b3c50d..000000000000 --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c @@@ -610,30 -265,18 +265,30 @@@ int mtd_add_partition(struct mtd_info * part.size =3D length; part.offset =3D offset; =20 - new =3D allocate_partition(parent, &part, -1, offset); - if (IS_ERR(new)) - return PTR_ERR(new); + child =3D allocate_partition(parent, &part, -1, offset); + if (IS_ERR(child)) + return PTR_ERR(child); =20 - mutex_lock(&mtd_partitions_mutex); - list_add(&new->list, &mtd_partitions); - mutex_unlock(&mtd_partitions_mutex); + mutex_lock(&master->props.master.partitions_lock); + list_add_tail(&child->props.part.node, &parent->partitions); + mutex_unlock(&master->props.master.partitions_lock); =20 - ret =3D add_mtd_device(&new->mtd); - add_mtd_device(child); ++ ret =3D add_mtd_device(child); + if (ret) + goto err_remove_part; =20 - mtd_add_partition_attrs(new); + mtd_add_partition_attrs(child); =20 + return 0; + +err_remove_part: - mutex_lock(&mtd_partitions_mutex); - list_del(&new->list); - mutex_unlock(&mtd_partitions_mutex); ++ mutex_lock(&master->props.master.partitions_lock); ++ list_del(&child->props.part.node); ++ mutex_unlock(&master->props.master.partitions_lock); + - free_partition(new); ++ free_partition(child); + pr_info("%s:%i\n", __func__, __LINE__); + return ret; } EXPORT_SYMBOL_GPL(mtd_add_partition); @@@ -722,46 -386,33 +398,47 @@@ int add_mtd_partitions(struct mtd_info=20 const struct mtd_partition *parts, int nbparts) { - struct mtd_part *slave; + struct mtd_info *child, *master =3D mtd_get_master(parent); uint64_t cur_offset =3D 0; - int i; + int i, ret; =20 - printk(KERN_NOTICE "Creating %d MTD partitions on \"%s\":\n", nbparts, m= aster->name); + printk(KERN_NOTICE "Creating %d MTD partitions on \"%s\":\n", + nbparts, parent->name); =20 for (i =3D 0; i < nbparts; i++) { - slave =3D allocate_partition(master, parts + i, i, cur_offset); - if (IS_ERR(slave)) { - ret =3D PTR_ERR(slave); + child =3D allocate_partition(parent, parts + i, i, cur_offset); + if (IS_ERR(child)) { - del_mtd_partitions(parent); - return PTR_ERR(child); ++ ret =3D PTR_ERR(child); + goto err_del_partitions; } =20 - mutex_lock(&mtd_partitions_mutex); - list_add(&slave->list, &mtd_partitions); - mutex_unlock(&mtd_partitions_mutex); + mutex_lock(&master->props.master.partitions_lock); + list_add_tail(&child->props.part.node, &parent->partitions); + mutex_unlock(&master->props.master.partitions_lock); =20 - add_mtd_device(child); + ret =3D add_mtd_device(child); + if (ret) { - mutex_lock(&mtd_partitions_mutex); - list_del(&slave->list); - mutex_unlock(&mtd_partitions_mutex); ++ mutex_lock(&master->props.master.partitions_lock); ++ list_del(&child->props.part.node); ++ mutex_unlock(&master->props.master.partitions_lock); + - free_partition(slave); ++ free_partition(child); + goto err_del_partitions; + } + - mtd_add_partition_attrs(slave); + mtd_add_partition_attrs(child); /* Look for subpartitions */ - parse_mtd_partitions(&slave->mtd, parts[i].types, NULL); + parse_mtd_partitions(child, parts[i].types, NULL); =20 - cur_offset =3D slave->offset + slave->mtd.size; + cur_offset =3D child->props.part.offset + child->size; } =20 return 0; + +err_del_partitions: - del_mtd_partitions(master); ++ del_mtd_partitions(parent); + + return ret; } =20 static DEFINE_SPINLOCK(part_parser_lock); --Sig_/V3DFixBTCDCpDgE5gzqtXFn Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAlxPm3wACgkQAVBC80lX 0GwvRQf/W9lL+KMNOwYrIemfRN8/Jqjc4gQYTDlTy5MW7mjtIdaG3er5yn2XV6Hi d+qWUBXLPcdI7GzZP7ENF3SwgeeDKykg0jbHLNHzmKrljvT18njB+GdUcdtMgQll hvgfRPSMv6uDaSiP9d9j8l/hzg+vPL4QB+vjY1oFGwIxaPwQUXmAw9wHIUGkM3iL g1a8t7Dj4ZeBKQ2BtuaEBHHrKQ06Yu6WcriUjVvQvTDq9+rwummuWW0HdUbHHKrp 8ijDG391+Ud52T4gQNCDsaiMHJ01KQ6pI1FCdJJ7v4PCIVGEw2x9QWDbr3KlzUHK s+OO6uxm1mLUkx7qaBIdof+0kYcQwA== =9ZCY -----END PGP SIGNATURE----- --Sig_/V3DFixBTCDCpDgE5gzqtXFn--