* [PATCH v2] tools/counter: Makefile: Replace rmdir by rm to avoid make,clean failure
@ 2023-07-16 15:44 Anh Tuan Phan
2023-07-21 13:10 ` William Breathitt Gray
0 siblings, 1 reply; 3+ messages in thread
From: Anh Tuan Phan @ 2023-07-16 15:44 UTC (permalink / raw)
To: william.gray, rongtao, ricardo
Cc: linux-iio, linux-kernel, linux-kernel-mentees, Shuah Khan
Use rm -df instead of rmdir -p since rmdir requires the directory exist
so it causes "make -C tools clean" failed if someone only builds other
tools but not counter.
Fixes: 228354ed692f ("tools/counter: Makefile: Remove lingering
'include' directories on make clean")
Signed-off-by: Anh Tuan Phan <tuananhlfc@gmail.com>
---
Changes from v1:
- Use rm -df instead of checking the directory exists
- Add Fixes tag
- Update the patch title
Reference:
- v1:
https://lore.kernel.org/all/362e127d-6018-5fc6-247b-3c729b99d946@gmail.com/
---
tools/counter/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/counter/Makefile b/tools/counter/Makefile
index a0f4cab71fe5..b2c2946f44c9 100644
--- a/tools/counter/Makefile
+++ b/tools/counter/Makefile
@@ -40,7 +40,8 @@ $(OUTPUT)counter_example: $(COUNTER_EXAMPLE)
clean:
rm -f $(ALL_PROGRAMS)
rm -rf $(OUTPUT)include/linux/counter.h
- rmdir -p $(OUTPUT)include/linux
+ rm -df $(OUTPUT)include/linux
+ rm -df $(OUTPUT)include
find $(or $(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete
install: $(ALL_PROGRAMS)
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] tools/counter: Makefile: Replace rmdir by rm to avoid make,clean failure
2023-07-16 15:44 [PATCH v2] tools/counter: Makefile: Replace rmdir by rm to avoid make,clean failure Anh Tuan Phan
@ 2023-07-21 13:10 ` William Breathitt Gray
2023-07-23 15:01 ` Anh Tuan Phan
0 siblings, 1 reply; 3+ messages in thread
From: William Breathitt Gray @ 2023-07-21 13:10 UTC (permalink / raw)
To: Anh Tuan Phan
Cc: william.gray, rongtao, ricardo, linux-iio, linux-kernel,
linux-kernel-mentees, Shuah Khan
[-- Attachment #1: Type: text/plain, Size: 1661 bytes --]
On Sun, Jul 16, 2023 at 10:44:56PM +0700, Anh Tuan Phan wrote:
> Use rm -df instead of rmdir -p since rmdir requires the directory exist
> so it causes "make -C tools clean" failed if someone only builds other
> tools but not counter.
>
> Fixes: 228354ed692f ("tools/counter: Makefile: Remove lingering
> 'include' directories on make clean")
Hi Anh,
Tags should span a single line even if they are long. This is minor
enough that I will clean it as I pick up the patch so no need to worry
about it this time. In the future, run script/checkpatch.pl on your
patches to catch these type of mistakes that are easy to miss.
I'll queue this patch for the counter-fixes branch.
Thanks,
William Breathitt Gray
> Signed-off-by: Anh Tuan Phan <tuananhlfc@gmail.com>
> ---
> Changes from v1:
> - Use rm -df instead of checking the directory exists
> - Add Fixes tag
> - Update the patch title
> Reference:
> - v1:
> https://lore.kernel.org/all/362e127d-6018-5fc6-247b-3c729b99d946@gmail.com/
> ---
> tools/counter/Makefile | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/counter/Makefile b/tools/counter/Makefile
> index a0f4cab71fe5..b2c2946f44c9 100644
> --- a/tools/counter/Makefile
> +++ b/tools/counter/Makefile
> @@ -40,7 +40,8 @@ $(OUTPUT)counter_example: $(COUNTER_EXAMPLE)
> clean:
> rm -f $(ALL_PROGRAMS)
> rm -rf $(OUTPUT)include/linux/counter.h
> - rmdir -p $(OUTPUT)include/linux
> + rm -df $(OUTPUT)include/linux
> + rm -df $(OUTPUT)include
> find $(or $(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete
>
> install: $(ALL_PROGRAMS)
> --
> 2.34.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] tools/counter: Makefile: Replace rmdir by rm to avoid make,clean failure
2023-07-21 13:10 ` William Breathitt Gray
@ 2023-07-23 15:01 ` Anh Tuan Phan
0 siblings, 0 replies; 3+ messages in thread
From: Anh Tuan Phan @ 2023-07-23 15:01 UTC (permalink / raw)
To: William Breathitt Gray
Cc: william.gray, rongtao, ricardo, linux-iio, linux-kernel,
linux-kernel-mentees, Shuah Khan
On 7/21/23 20:10, William Breathitt Gray wrote:
> On Sun, Jul 16, 2023 at 10:44:56PM +0700, Anh Tuan Phan wrote:
>> Use rm -df instead of rmdir -p since rmdir requires the directory exist
>> so it causes "make -C tools clean" failed if someone only builds other
>> tools but not counter.
>>
>> Fixes: 228354ed692f ("tools/counter: Makefile: Remove lingering
>> 'include' directories on make clean")
>
> Hi Anh,
>
> Tags should span a single line even if they are long. This is minor
> enough that I will clean it as I pick up the patch so no need to worry
> about it this time. In the future, run script/checkpatch.pl on your
> patches to catch these type of mistakes that are easy to miss.
>
> I'll queue this patch for the counter-fixes branch.
>
> Thanks,
>
> William Breathitt Gray
>
Thanks for helping me correct the patch, will run the script in the future.
Best,
Anh
>> Signed-off-by: Anh Tuan Phan <tuananhlfc@gmail.com>
>> ---
>> Changes from v1:
>> - Use rm -df instead of checking the directory exists
>> - Add Fixes tag
>> - Update the patch title
>> Reference:
>> - v1:
>> https://lore.kernel.org/all/362e127d-6018-5fc6-247b-3c729b99d946@gmail.com/
>> ---
>> tools/counter/Makefile | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/counter/Makefile b/tools/counter/Makefile
>> index a0f4cab71fe5..b2c2946f44c9 100644
>> --- a/tools/counter/Makefile
>> +++ b/tools/counter/Makefile
>> @@ -40,7 +40,8 @@ $(OUTPUT)counter_example: $(COUNTER_EXAMPLE)
>> clean:
>> rm -f $(ALL_PROGRAMS)
>> rm -rf $(OUTPUT)include/linux/counter.h
>> - rmdir -p $(OUTPUT)include/linux
>> + rm -df $(OUTPUT)include/linux
>> + rm -df $(OUTPUT)include
>> find $(or $(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete
>>
>> install: $(ALL_PROGRAMS)
>> --
>> 2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-23 15:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-16 15:44 [PATCH v2] tools/counter: Makefile: Replace rmdir by rm to avoid make,clean failure Anh Tuan Phan
2023-07-21 13:10 ` William Breathitt Gray
2023-07-23 15:01 ` Anh Tuan Phan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox