Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4050110ybf; Tue, 3 Mar 2020 18:52:30 -0800 (PST) X-Google-Smtp-Source: ADFU+vuxJLQbmltcsNLe6U9cZvCAcnRcG11Pc7W8dNcipScti4vdp26zMJw2dVpwFAmjRHg26mRM X-Received: by 2002:aca:f354:: with SMTP id r81mr366235oih.90.1583290350516; Tue, 03 Mar 2020 18:52:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583290350; cv=none; d=google.com; s=arc-20160816; b=mlc/UoLjIi0vNp1yHfrbHPr3gWKQz1X1ZLYBW/Ryay16daSvAaspELpU2L0KE+UrWu fVG9n+WAulBpSGD+46xJ9p6pqZCPA9k0KfDj/LJu+mw0Ex0lkfn4GvlE46rDmCL7xCaj f3oT9gu8w2u1S9h9FEwb9fn4At0/VJWO9M5Yc9fT2Cuu5spMDfxKqD9xJAYYN2XRDFcw JW89ZUabDAUTMJ39pN1Jm7ijsSALdfWLRE5BR5pyEBpBLbzblGX4jYbUeSxgu9g2sMzO aV2jq4MKH5t99KMOcpLpkD1ZKezp/unpNPHbSx1SxMIbWQC4qlc2w6Au2T8AOt+dg5pU KWHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7FGKC2CL96iktvyoBP2vbwLVT6EXR3CbHjrpB2EcLgw=; b=GVOJ/xjPlGDU034NexihuiFpo5DoYGps0IgFQmL7kh3LffjGQIF2ttHynfcc2bnw2L 3HluDPQrIqhEiSSRWPAaeB9kFVwwhrlrrL4WPtV86a2ziEk85IFRgnE2h4kzfMN74wTg KPs3kBmpNFf594QWMrBl5f5Rid2POO1iD+fuEOETDNSeNcwCt9RYtk7jpsO5GJbUxm0b C7lq588iXmYQJ/cOQYIWxxrwRh3dVAtMVsc9q7KPIzl5/15mduVLwwwRrSwHFDp7WSto 8r7VD3ziHjSXNhz2PtKAoXeXG6JsgGdyeqQztowuAbXmj7FmTfF/4/c8V3HbokU/alO+ ntUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=hPYqR650; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w22si349057oih.103.2020.03.03.18.52.19; Tue, 03 Mar 2020 18:52:30 -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=@mediatek.com header.s=dk header.b=hPYqR650; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387532AbgCDCvU (ORCPT + 99 others); Tue, 3 Mar 2020 21:51:20 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:27958 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2387411AbgCDCvU (ORCPT ); Tue, 3 Mar 2020 21:51:20 -0500 X-UUID: dec6e0326ba54b168947a9cbb341fd39-20200304 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=7FGKC2CL96iktvyoBP2vbwLVT6EXR3CbHjrpB2EcLgw=; b=hPYqR650vpsEYzBHmuAXyKnxqVIEQBBVAcCTMDzNGoAwtzCDRYIwjuEb74suQHC5uF4kn9HIzQZzW9VPpMZXVOqR6GhdGGz6Sna6R/dEJQeOswmugcivby0Zpb9CoNoF+LDw6DxpNOBtZMdUVkZODgFNz4OAgslUCgFw25w1QQs=; X-UUID: dec6e0326ba54b168947a9cbb341fd39-20200304 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1622470829; Wed, 04 Mar 2020 10:51:17 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs05n1.mediatek.inc (172.21.101.15) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 4 Mar 2020 10:50:08 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 4 Mar 2020 10:51:55 +0800 From: To: CC: , , , , , , Light Hsieh Subject: [PATCH v1 3/3] block: set partition read/write policy according to write-protection status Date: Wed, 4 Mar 2020 10:51:14 +0800 Message-ID: <1583290274-5525-4-git-send-email-light.hsieh@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1583290274-5525-1-git-send-email-light.hsieh@mediatek.com> References: <1583290274-5525-1-git-send-email-light.hsieh@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogTGlnaHQgSHNpZWggPGxpZ2h0LmhzaWVoQG1lZGlhdGVrLmNvbT4NCg0KRm9yIHN0b3Jh Z2UgZGV2aWNlIHdpdGggd3JpdGUtcHJvdGVjdGlvbiBzdXBwb3J0LCBlLmcuIGVNTUMsIHJlZ2lz dGVyDQpjaGVja19kaXNrX3JhbmdlX3dwKCkgaW4gc3RydWN0IGJsb2NrX2Rldm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