From: "Michael S. Tsirkin" <mst@redhat.com>
To: Feng Liu <feliu@nvidia.com>
Cc: virtualization@lists.linux-foundation.org,
Jiri Pirko <jiri@nvidia.com>, Bodong Wang <bodong@nvidia.com>,
Gavin Li <gavinl@nvidia.com>
Subject: Re: [PATCH 3/3] virtio_ring: Use const to annotate read-only pointer params
Date: Wed, 8 Mar 2023 09:47:33 -0500 [thread overview]
Message-ID: <20230308094115-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <cc5de402-ad79-7bce-74d3-77356a6fb66a@nvidia.com>
On Wed, Mar 08, 2023 at 09:40:03AM -0500, Feng Liu wrote:
> In fact, I compiled and tested locally. I just looked it up and it might be
> that I was missing a “git add” action which caused the problem. Before I
> post the patch in future, I will find a clean kernel source and apply my
> patch for testing instead of on the branch where the code is modified, so as
> to avoid this kind of problem from happening again. Very sorry for this
> problem, I will be careful and pay attention to it later
I have a pre-push hook since it was happening to me a lot with pushes:
#!/bin/sh
# An example hook script to verify what is about to be pushed. Called by "git
# push" after it has checked the remote status, but before anything has been
# pushed. If this script exits with a non-zero status nothing will be pushed.
#
# This hook is called with the following parameters:
#
# $1 -- Name of the remote to which the push is being done
# $2 -- URL to which the push is being done
#
# If pushing without using a named remote those arguments will be equal.
#
# Information about the commits which are being pushed is supplied as lines to
# the standard input in the form:
#
# <local ref> <local sha1> <remote ref> <remote sha1>
#
# This sample shows how to prevent push of commits where the log message starts
# with "WIP" (work in progress).
remote="$1"
url="$2"
echo "Pre push hook for remote $url"
#if
# echo $url |grep ^root@virtlab > /dev/null
#then
# echo "Lab push no need to check"
# exit 0
#fi
#
#if
# echo $url |grep ^/ > /dev/null
#then
# echo "Local push no need to check"
# exit 0
#fi
checked=0
HEAD=`git rev-list -1 HEAD`
IFS=' '
while read local_ref local_sha remote_ref remote_sha
do
if [ $checked = 0 ]
then
if [ "$local_sha" = $HEAD ]
then
echo "Pushing HEAD to remote. Checking that tree is clean."
if
git diff-index --quiet HEAD
then
echo -n # No differences
else
echo "DIFF in HEAD. Not pushed, stash or -no-verify!"
exit 1
fi
checked=1
fi
fi
done
exit 0
Consider sticking this in a post commit hook maybe?
--
MST
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next prev parent reply other threads:[~2023-03-08 14:47 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-07 3:57 [PATCH 0/3] virtio_ring: Clean up code for virtio ring and pci Feng Liu via Virtualization
2023-03-07 3:57 ` [PATCH 1/3] virtio_pci_modern: Remove unnecessary num zero check Feng Liu via Virtualization
2023-03-07 9:10 ` David Edmondson
2023-03-08 5:52 ` Jason Wang
2023-03-08 6:57 ` Michael S. Tsirkin
2023-03-08 14:23 ` Michael S. Tsirkin
2023-03-08 14:33 ` Feng Liu via Virtualization
2023-03-07 3:57 ` [PATCH 2/3] virtio_ring: Avoid using inline for small functions Feng Liu via Virtualization
2023-03-07 9:11 ` David Edmondson
2023-03-08 5:55 ` Jason Wang
2023-03-07 3:57 ` [PATCH 3/3] virtio_ring: Use const to annotate read-only pointer params Feng Liu via Virtualization
2023-03-07 9:14 ` David Edmondson
2023-03-07 21:17 ` Feng Liu via Virtualization
2023-03-08 14:13 ` Michael S. Tsirkin
2023-03-08 15:59 ` Feng Liu via Virtualization
2023-03-08 16:25 ` Michael S. Tsirkin
2023-03-08 16:44 ` Feng Liu via Virtualization
2023-03-08 16:49 ` Michael S. Tsirkin
2023-03-08 17:26 ` Feng Liu via Virtualization
2023-03-08 5:58 ` Jason Wang
2023-03-08 14:07 ` Feng Liu via Virtualization
2023-03-08 14:13 ` Feng Liu via Virtualization
2023-03-08 14:16 ` Michael S. Tsirkin
2023-03-08 14:19 ` Feng Liu via Virtualization
2023-03-08 14:28 ` Michael S. Tsirkin
2023-03-08 14:40 ` Feng Liu via Virtualization
2023-03-08 14:47 ` Michael S. Tsirkin [this message]
2023-03-08 15:47 ` Feng Liu via Virtualization
[not found] ` <ZAmlwyVfz+IK1b6T@nanopsycho>
2023-03-09 14:27 ` Michael S. Tsirkin
2023-03-08 6:59 ` Michael S. Tsirkin
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=20230308094115-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=bodong@nvidia.com \
--cc=feliu@nvidia.com \
--cc=gavinl@nvidia.com \
--cc=jiri@nvidia.com \
--cc=virtualization@lists.linux-foundation.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;
as well as URLs for NNTP newsgroup(s).