LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: LEROY Christophe <christophe.leroy@c-s.fr>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 3/9] powerpc/mm: Remove extern from function definition
Date: Wed, 24 Oct 2018 11:59:45 -0300	[thread overview]
Message-ID: <3bd3ed6e-3390-a80f-59f8-c1cc0efaa10f@debian.org> (raw)
In-Reply-To: <20181023173828.Horde.uVbl4TiimFw-HLaYHTWqNw9@messagerie.si.c-s.fr>

hi Christophe,

On 10/23/2018 12:38 PM, LEROY Christophe wrote:
> Breno Leitao <leitao@debian.org> a écrit :
>>
>> This patch removes the keyword from the definition part, while keeps
>> it in
>> the declaration part.
> 
> I think checkpatch also says that extern should be avoided in declarations.

Thanks for the review. I tried to look at this complain, but I didn't see
this behavior on checkpatch.pl from kernel 4.19. I created a commit that adds
a new extern prototype and checked the patch. Take a look:

# git show

	commit 720cd4ee7bf3c0607eaea79e209b719bac79508e
	Author: Breno Leitao <leitao@debian.org>
	Date:   Wed Oct 24 10:31:54 2018 -0400

	powerpc/mm: New test function

	New test function.

	Signed-off-by: Breno Leitao <leitao@debian.org>

	diff --git a/arch/powerpc/include/asm/hugetlb.h
	b/arch/powerpc/include/asm/hugetlb.h
	index 2d00cc530083..4a348e42cab6 100644
	--- a/arch/powerpc/include/asm/hugetlb.h
	+++ b/arch/powerpc/include/asm/hugetlb.h
	@@ -167,6 +167,8 @@ extern int huge_ptep_set_access_flags(struct vm_area_struct *vma,
				      unsigned long addr, pte_t *ptep,
				      pte_t pte, int dirty);

	+extern int test(int foo);
	+
	static inline pte_t huge_ptep_get(pte_t *ptep)
	{
		return *ptep;

	diff --git a/mm/hugetlb.c b/mm/hugetlb.c
	index 5c390f5a5207..2e8f5f77f7f6 100644
	--- a/mm/hugetlb.c
	+++ b/mm/hugetlb.c
	@@ -3204,6 +3204,11 @@ static void set_huge_ptep_writable(struct
	vm_area_struct *vma,
		update_mmu_cache(vma, address, ptep);
	}

	+int test(int foo)
	+{
	+	return foo;
	+}
	+
	bool is_hugetlb_entry_migration(pte_t pte)
	{
	swp_entry_t swp;


# scripts/checkpatch.pl -g HEAD

	total: 0 errors, 0 warnings, 19 lines checked

	Commit 720cd4ee7bf3 ("powerpc/mm: New test function") has no obvious
	style problems and is ready for submission.

  reply	other threads:[~2018-10-24 15:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-22 14:54 [PATCH 1/9] powerpc/64s: Include cpu header Breno Leitao
2018-10-22 14:54 ` [PATCH 2/9] powerpc/eeh: Declare pci_ers_result_name() as static Breno Leitao
2018-10-22 14:54 ` [PATCH 3/9] powerpc/mm: Remove extern from function definition Breno Leitao
2018-10-23 15:38   ` LEROY Christophe
2018-10-24 14:59     ` Breno Leitao [this message]
2018-10-24 15:12       ` LEROY Christophe
2018-10-31 14:43         ` Breno Leitao
2018-10-22 14:54 ` [PATCH 4/9] powerpc/xive: Define xive_do_source_eoi as static Breno Leitao
2018-10-22 14:54 ` [PATCH 5/9] powerpc/xmon: Define static functions Breno Leitao
2018-10-22 14:54 ` [PATCH 6/9] powerpc/lib: Declare static methods Breno Leitao
2018-10-22 14:54 ` [PATCH 7/9] powerpc/scom: Return NULL instead of 0 Breno Leitao
2018-10-22 14:54 ` [PATCH 8/9] powerpc/perf: Declare static identifier a such Breno Leitao
2018-10-22 14:54 ` [PATCH 9/9] powerpc/pkey: Define functions as static Breno Leitao
2018-11-27  9:22 ` [1/9] powerpc/64s: Include cpu header Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3bd3ed6e-3390-a80f-59f8-c1cc0efaa10f@debian.org \
    --to=leitao@debian.org \
    --cc=christophe.leroy@c-s.fr \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox